Improve method check_delegator_restriction in delegation_based_restriction_mixin.py #2508
Labels
enhancement
General enhancement which is neither bug nor feature
good first issue
Good intro issue for introduction to the backend
Milestone
First improvement:
Set the call parameter
lock_result
of the resulting db-calls toFalse
. Reason: The result of the method are part of user permissions. It is not necessary to lock database in this cases.Second improvement:
Reduce the database actions:
meeting_users = self.datastore.filter(
"meeting_user",
And(
Or(
FilterOperator("meeting_id", "=", meeting_id)
for meeting_id in meeting_ids
),
FilterOperator("user_id", "=", self.user_id),
FilterOperator("vote_delegated_to_id", "!=", None),
),
["meeting_id"],
)
The text was updated successfully, but these errors were encountered: