1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Replace timezone.now().date() by date.today()

This commit is contained in:
Yohann D'ANELLO
2020-08-16 00:35:13 +02:00
parent da23df05cb
commit b8c3dda95b
8 changed files with 46 additions and 42 deletions

View File

@ -1,9 +1,10 @@
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from datetime import date
import django_tables2 as tables
from django.contrib.auth.models import User
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from django.urls import reverse_lazy
from django.utils.html import format_html
@ -106,8 +107,8 @@ class MembershipTable(tables.Table):
empty_membership = Membership(
club=record.club,
user=record.user,
date_start=timezone.now().date(),
date_end=timezone.now().date(),
date_start=date.today(),
date_end=date.today(),
fee=0,
)
if PermissionBackend.check_perm(get_current_authenticated_user(),