Change to use settings instead of hardcoding

This commit is contained in:
lsacienne 2022-04-27 15:38:55 +02:00
parent 15e2c8c7b3
commit bbf362691b
No known key found for this signature in database
GPG Key ID: 5B1939A93F7A6F48

View File

@ -22,6 +22,7 @@
#
#
from sith.settings import SITH_MAIN_CLUB
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
@ -344,7 +345,7 @@ class Counter(models.Model):
def can_refill(self):
is_ae_member = False
ae = Club.objects.get(unix_name="ae")
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):
is_ae_member = True