Browse Source

add leading zeros to project PID

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

+ 1
- 1
input/models.py View File

@ -77,7 +77,7 @@ class Project(Volunteer):
def save(self,*args,**kwargs):
# is there a way to call super().save() only once?
super().save(*args,*kwargs)
self.pid = self.account + str(self.pk)
self.pid = self.account + str(self.pk).zfill(3)
super().save(*args,*kwargs)
def __str__(self):

Loading…
Cancel
Save