mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
optimize query
This commit is contained in:
1 parent
76821a4c2d
commit
5f23d5a5ab
1 file changed
+1
-3
@@ -305,9 +305,7 @@ module Submitters
|
||||
|
||||
return unless blob
|
||||
|
||||
return blob unless blob.attachments.exists?
|
||||
|
||||
return blob if account.submitters.exists?(id: blob.attachments.where(record_type: 'Submitter').select(:record_id))
|
||||
return blob if blob.attachments.take&.record&.account_id == account.id
|
||||
|
||||
nil
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user