Skip to content

Commit dc6da92

Browse files
rsmithlalCopilot
andauthored
Update app/policies/better_together/event_policy.rb
Adjust arel query construction Co-authored-by: Copilot <[email protected]> Signed-off-by: Robert Smith <[email protected]>
1 parent 8d87b94 commit dc6da92

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/policies/better_together/event_policy.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def permitted_query # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
5656
)
5757
if agent.valid_event_host_ids.any?
5858
event_ids = event_hosts_table.where(event_hosts_table[:host_id]
59-
.in(agent.valid_event_host_ids)).project(:event_id)
59+
event_ids = event_hosts_table
60+
.where(event_hosts_table[:host_id].in(agent.valid_event_host_ids))
61+
.project(:event_id)
6062
query = query.or(
6163
events_table[:id].in(event_ids)
6264
)

0 commit comments

Comments
 (0)