diff --git a/app/jobs/sync_all_topics_job.rb b/app/jobs/sync_all_topics_job.rb index 895806b..484871e 100644 --- a/app/jobs/sync_all_topics_job.rb +++ b/app/jobs/sync_all_topics_job.rb @@ -32,7 +32,7 @@ def process_row(row, indices, sync_all) if project_metais_code.present? - project = Project.find_by(id: project_id) + project = Project.find_or_initialize_by(id: project_id) project.metais_code = project_metais_code project.save! end