mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
optimize webhooks query
This commit is contained in:
1 parent
cb6d24dfca
commit
6dd4382446
1 file changed
+1
-1
+1
-1
@@ -10,7 +10,7 @@ module WebhookUrls
|
||||
|
||||
event_arel = events.map { |event| Arel::Table.new(:webhook_urls)[:events].matches("%\"#{event}\"%") }.reduce(:or)
|
||||
|
||||
if Docuseal.multitenant?
|
||||
if Docuseal.multitenant? || account_id == 1
|
||||
rel.where(event_arel)
|
||||
else
|
||||
linked_account_rel =
|
||||
|
||||
Reference in new issue
Block a user