diff --git a/input/models.py b/input/models.py index 4803db7..90b7384 100755 --- a/input/models.py +++ b/input/models.py @@ -154,16 +154,8 @@ class Project(Volunteer): # self.pid = str(self.account.code) + str(self.pk).zfill(3) print (("Hallo Leute! Ich save jetzt mal MIT PID DANN!!!",self.pid)) - - # generation of field quartals - if self.end.month in [1, 2, 3]: - self.end_quartal = 'Q1' - if self.end.month in [4, 5, 6]: - self.end_quartal = 'Q2' - if self.end.month in [7, 8, 9]: - self.end_quartal = 'Q3' - if self.end.month in [10, 11, 12]: - self.end_quartal = 'Q4' + if self.end: + self.end_quartal = f'Q{self.end.month // 4 + 1}' super().save()