Skip to content

Commit

Permalink
CV2-5002: fix sentry issue (#1978)
Browse files Browse the repository at this point in the history
* CV2-5002: fix sentry issue

* CV2-5002: fix tests
  • Loading branch information
melsawy committed Aug 12, 2024
1 parent e1f235c commit 3de819b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/bot/alegre.rb
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def self.is_suggested_to_trash(source, target, relationship_type)
end

def self.create_relationship(source, target, pm_id_scores, relationship_type, original_source=nil, original_relationship_type=nil)
return nil if !self.can_create_relationship?(source, target, relationship_type)
return nil if source&.id == target&.id || !self.can_create_relationship?(source, target, relationship_type)
r = Relationship.where(source_id: source.id, target_id: target.id)
.where('relationship_type = ? OR relationship_type = ?', Relationship.confirmed_type.to_yaml, Relationship.suggested_type.to_yaml).last
if r.nil?
Expand Down

0 comments on commit 3de819b

Please sign in to comment.