Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/models/bot/alegre.rb
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,9 @@ def self.can_create_relationship?(source, target, relationship_type)
# Make sure that items imported from shared feed are not related automatically to anything,
# since multiple medias can be imported at the same time, so the imported medias should form a cluster themselves
return false if target.is_imported_from_shared_feed?
# Verify that target should not have a published report
state = target.get_annotations('report_design').first&.load&.get_field_value('state')
return false if state == 'published'
return true
end

Expand Down
Loading