Skip to content
Snippets Groups Projects
Commit 9f1f2e42 authored by Dylan Sechet's avatar Dylan Sechet
Browse files

Fixed year updated before registration form filled

parent 32722746
No related branches found
No related tags found
13 merge requests!58Hamza,!52Hamza,!54Add field "en attentes" in participations options,!51Hamza,!48Hamza,!45Hamza,!40Solve public permission files on AWS,!36Notifications for Sec-Gen,!34Dev-> Master (ordering students by updated_date, school filter, export_csv for visits),!31Sorties,!28Updated student admin filters,!27Better filtering for registration,!26merge dev into master
...@@ -185,6 +185,7 @@ class Student(ProfileMixin, models.Model): ...@@ -185,6 +185,7 @@ class Student(ProfileMixin, models.Model):
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
"""Updates the year field based on the last modified date""" """Updates the year field based on the last modified date"""
if self.city != None: # Ne mettre à jour que quand les données personnelles sont remplies
date_now = datetime.now() date_now = datetime.now()
if date_now.month>=9: if date_now.month>=9:
self.year = f"{date_now.year}/{date_now.year+1}" self.year = f"{date_now.year}/{date_now.year+1}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment