Skip to content

Commit

Permalink
CV2-5371: fix sentry issue (#2058)
Browse files Browse the repository at this point in the history
  • Loading branch information
melsawy authored Sep 30, 2024
1 parent dbb7863 commit 451d964
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/project_media.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def self.destroy_related_medias(project_media, user_id = nil)
end

def replace_by(new_pm, skip_send_report = false)
return if self.id == new_pm.id
return if self.id == new_pm.id || new_pm.nil?
if self.team_id != new_pm.team_id
raise I18n.t(:replace_by_media_in_the_same_team)
elsif self.media.media_type != 'blank'
Expand Down

0 comments on commit 451d964

Please sign in to comment.