From 24e1ad6dc83bca459a7d0c81f916e43eac5037bb Mon Sep 17 00:00:00 2001 From: imperosol Date: Sat, 27 Sep 2025 16:02:36 +0200 Subject: [PATCH] apply review comments --- club/forms.py | 6 ++++-- eboutic/static/bundled/eboutic/eboutic-index.ts | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/club/forms.py b/club/forms.py index abc72df1..27b5054c 100644 --- a/club/forms.py +++ b/club/forms.py @@ -231,10 +231,10 @@ class ClubMemberForm(forms.ModelForm): self.instance.club = club @property - def max_available_role(self): # pragma: no cover + def max_available_role(self): """The greatest role that will be obtainable with this form.""" # this is unreachable, because it will be overridden by subclasses - return -1 + return -1 # pragma: no cover class ClubAddMemberForm(ClubMemberForm): @@ -283,6 +283,8 @@ class JoinClubForm(ClubMemberForm): def __init__(self, *args, club: Club, request_user: User, **kwargs): super().__init__(*args, club=club, request_user=request_user, **kwargs) + # this form doesn't manage the user who will join the club, + # so we must set this here to avoid errors self.instance.user = self.request_user @cached_property diff --git a/eboutic/static/bundled/eboutic/eboutic-index.ts b/eboutic/static/bundled/eboutic/eboutic-index.ts index d422431d..93afc81b 100644 --- a/eboutic/static/bundled/eboutic/eboutic-index.ts +++ b/eboutic/static/bundled/eboutic/eboutic-index.ts @@ -17,8 +17,6 @@ document.addEventListener("alpine:init", () => { this.$watch("basket", () => { this.saveBasket(); }); - console.log(lastPurchaseTime); - console.log(localStorage.basketTimestamp); // Invalidate basket if a purchase was made if (lastPurchaseTime !== null && localStorage.basketTimestamp !== undefined) { if (