Skip to content

Commit

Permalink
Update app/jobs/link_metais_projects_and_evaluations_job.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
celuchmarek authored Oct 7, 2024
1 parent 7e0473a commit b2e270e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/jobs/link_metais_projects_and_evaluations_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ def perform
def link_metais_project(project)
code = project.metais_code
metais_project = Metais::Project.find_by(code: code)
return unless metais_project

if metais_project.present? && !project.metais_projects.exists?(metais_project.id)
unless project.metais_projects.exists?(metais_project.id)
project.metais_projects << metais_project
end
end
Expand Down

0 comments on commit b2e270e

Please sign in to comment.