Browse Source

just removed some debug prints

master
Benni Baermann 3 years ago
parent
commit
b228285344
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      input/models.py

+ 3
- 3
input/models.py View File

@ -96,15 +96,15 @@ class Project(Volunteer):
self.pid = str(self.account.code) + str(self.pk).zfill(3) self.pid = str(self.account.code) + str(self.pk).zfill(3)
# generation of finance_id # generation of finance_id
if not self.project_of_year: if not self.project_of_year:
print('AAA')
#print('AAA')
# we need to determine if this is a new year with its first new project... # we need to determine if this is a new year with its first new project...
year = self.start.year year = self.start.year
projects = Project.objects.filter(start__year=year) projects = Project.objects.filter(start__year=year)
if not projects: if not projects:
print('BBB')
#print('BBB')
self.project_of_year = 1 self.project_of_year = 1
else: else:
print('CCC')
#print('CCC')
projects = projects.order_by("-project_of_year")[0] projects = projects.order_by("-project_of_year")[0]
self.project_of_year = int(projects.project_of_year) + 1 self.project_of_year = int(projects.project_of_year) + 1
self.finance_id = str(self.account.code) + str(self.project_of_year).zfill(3) self.finance_id = str(self.account.code) + str(self.project_of_year).zfill(3)

Loading…
Cancel
Save