1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-26 18:37:12 +00:00

Fix linters

This commit is contained in:
Yohann D'ANELLO 2020-08-15 19:10:23 +02:00
parent fe2af5ac2b
commit 0bf5067b60
3 changed files with 5 additions and 6 deletions

View File

@ -385,8 +385,8 @@ class ClubDetailView(ProtectQuerysetMixin, LoginRequiredMixin, DetailView):
empty_membership = Membership(
club=club,
user=User.objects.first(),
date_start=datetime.now().date(),
date_end=datetime.now().date(),
date_start=date.today(),
date_end=date.today(),
fee=0,
)
context["can_add_members"] = PermissionBackend()\
@ -601,8 +601,8 @@ class ClubAddMemberView(ProtectQuerysetMixin, LoginRequiredMixin, ProtectedCreat
if user.note.balance + credit_amount < fee and not Membership.objects.filter(
club__name="Kfet",
user=user,
date_start__lte=datetime.now().date(),
date_end__gte=datetime.now().date(),
date_start__lte=date.today(),
date_end__gte=date.today(),
).exists():
# Users without a valid Kfet membership can't have a negative balance.
# TODO Send a notification to the user (with a mail?) to tell her/him to credit her/his note

View File

@ -1,8 +1,8 @@
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from django.core.exceptions import ValidationError
from django.db import models, transaction
from django.db.models import F
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import gettext_lazy as _

View File

@ -5,7 +5,6 @@ from datetime import date
from django.core.management import BaseCommand
from django.db.models import Q
from member.models import Membership, Club
from wei.models import WEIClub