Skip to content

Commit

Permalink
Add a way for rules to run the datanommer query
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Bompard <[email protected]>
  • Loading branch information
abompard committed Apr 23, 2024
1 parent 77b176d commit 137ff81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fedbadges/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ def _construct_query(self, msg):
log.debug("Making datanommer query: %r", kwargs)
kwargs["defer"] = True
total, pages, query = datanommer.models.Message.grep(**kwargs)
query.all = lambda: datanommer.models.session.scalars(query).all()
return total, pages, query

def _format_lambda_operation(self, msg):
Expand Down

0 comments on commit 137ff81

Please sign in to comment.