Replace the query by a function which already

existed
This commit is contained in:
lsacienne 2022-05-02 00:04:00 +02:00
parent b33839191d
commit f2666f6fb0
No known key found for this signature in database
GPG Key ID: 5B1939A93F7A6F48
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@ class Counter(models.Model):
is_ae_member = False
ae = Club.objects.get(unix_name=SITH_MAIN_CLUB["unix_name"])
for barman in self.get_barmen_list():
if Membership.objects.filter(club=ae, user=barman):
if ae.get_membership_for(barman):
is_ae_member = True
return is_ae_member