change Club.unix_name to Club.slug_name and remove it from forms

This commit is contained in:
imperosol
2025-03-01 11:47:40 +01:00
parent f764ce1585
commit 805b146f17
21 changed files with 377 additions and 395 deletions

View File

@ -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:

View File

@ -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,