mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
change Club.unix_name
to Club.slug_name
and remove it from forms
This commit is contained in:
@ -44,7 +44,6 @@ from core.fields import ResizedImageField
|
||||
from core.models import Group, Notification, User
|
||||
from core.utils import get_start_of_semester
|
||||
from counter.apps import PAYMENT_METHOD
|
||||
from sith.settings import SITH_MAIN_CLUB
|
||||
from subscription.models import Subscription
|
||||
|
||||
|
||||
@ -569,7 +568,7 @@ class Counter(models.Model):
|
||||
if self.type != "BAR":
|
||||
return False
|
||||
# at least one of the barmen is in the AE board
|
||||
ae = Club.objects.get(unix_name=SITH_MAIN_CLUB["unix_name"])
|
||||
ae = Club.objects.get(id=settings.SITH_MAIN_CLUB_ID)
|
||||
return any(ae.get_membership_for(barman) for barman in self.barmen_list)
|
||||
|
||||
def get_top_barmen(self) -> QuerySet:
|
||||
|
@ -783,7 +783,7 @@ class TestCounterStats(TestCase):
|
||||
s = Selling(
|
||||
label=barbar.name,
|
||||
product=barbar,
|
||||
club=Club.objects.get(name=settings.SITH_MAIN_CLUB["name"]),
|
||||
club=baker.make(Club),
|
||||
counter=cls.counter,
|
||||
unit_price=2,
|
||||
seller=cls.skia,
|
||||
|
Reference in New Issue
Block a user