Pastebin
Paste #25068: No description
< previous paste - next paste>
Pasted by Anonymous Coward
def save(self, *args, **kwargs):
created = not self.pk
if created:
super().save(*args, **kwargs)
if not self.code:
self.code = self.get_code_default()
return super().save(*args, **kwargs)
New Paste
Go to most recent paste.