mirror of
https://github.com/ae-utbm/sith.git
synced 2025-10-09 08:14:39 +00:00
apply review comments
This commit is contained in:
@@ -231,10 +231,10 @@ class ClubMemberForm(forms.ModelForm):
|
|||||||
self.instance.club = club
|
self.instance.club = club
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def max_available_role(self): # pragma: no cover
|
def max_available_role(self):
|
||||||
"""The greatest role that will be obtainable with this form."""
|
"""The greatest role that will be obtainable with this form."""
|
||||||
# this is unreachable, because it will be overridden by subclasses
|
# this is unreachable, because it will be overridden by subclasses
|
||||||
return -1
|
return -1 # pragma: no cover
|
||||||
|
|
||||||
|
|
||||||
class ClubAddMemberForm(ClubMemberForm):
|
class ClubAddMemberForm(ClubMemberForm):
|
||||||
@@ -283,6 +283,8 @@ class JoinClubForm(ClubMemberForm):
|
|||||||
|
|
||||||
def __init__(self, *args, club: Club, request_user: User, **kwargs):
|
def __init__(self, *args, club: Club, request_user: User, **kwargs):
|
||||||
super().__init__(*args, club=club, request_user=request_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
|
self.instance.user = self.request_user
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
|
@@ -17,8 +17,6 @@ document.addEventListener("alpine:init", () => {
|
|||||||
this.$watch("basket", () => {
|
this.$watch("basket", () => {
|
||||||
this.saveBasket();
|
this.saveBasket();
|
||||||
});
|
});
|
||||||
console.log(lastPurchaseTime);
|
|
||||||
console.log(localStorage.basketTimestamp);
|
|
||||||
// Invalidate basket if a purchase was made
|
// Invalidate basket if a purchase was made
|
||||||
if (lastPurchaseTime !== null && localStorage.basketTimestamp !== undefined) {
|
if (lastPurchaseTime !== null && localStorage.basketTimestamp !== undefined) {
|
||||||
if (
|
if (
|
||||||
|
Reference in New Issue
Block a user