mirror of
				https://gitlab.crans.org/bde/nk20-scripts
				synced 2025-10-29 22:39:51 +01:00 
			
		
		
		
	Replace timezone.now().date() by date.today()
This commit is contained in:
		| @@ -1,10 +1,11 @@ | ||||
| # Copyright (C) 2018-2020 by BDE ENS Paris-Saclay | ||||
| # SPDX-License-Identifier: GPL-3.0-or-later | ||||
|  | ||||
| from datetime import date | ||||
|  | ||||
| from django.core.mail import send_mail | ||||
| from django.core.management import BaseCommand | ||||
| from django.template.loader import render_to_string | ||||
| from django.utils import timezone | ||||
| from django.utils.translation import activate | ||||
|  | ||||
| from note.models import NoteUser | ||||
| @@ -21,7 +22,7 @@ class Command(BaseCommand): | ||||
|         activate('fr') | ||||
|         notes = NoteUser.objects.filter( | ||||
|             balance__lte=-options["negative_amount"], | ||||
|             user__memberships__date_end__gte=timezone.now().date(), | ||||
|             user__memberships__date_end__gte=date.today(), | ||||
|         ).order_by('balance').distinct().all() | ||||
|  | ||||
|         if options["spam"]: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user