From fd00d1b67a6ddac7ac0a0201e058fe8decf70079 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Tue, 2 Feb 2021 14:42:34 +0100 Subject: [PATCH] add leading zeros to project PID --- input/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/models.py b/input/models.py index c2816ab..c68bd83 100644 --- a/input/models.py +++ b/input/models.py @@ -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):