optimize webhooks query
This commit is contained in:
+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