Compare commits

...

2 Commits

Author SHA1 Message Date
014b00bc30 Fallback for pk being null on event display ID
This should never happen, but it is...though only in live, so I need to push this up for testing. Ref  #451
2021-11-04 23:03:03 +00:00
3f8fc82260 FIX: Duplicating an event clears collected by 2021-11-04 21:41:39 +00:00
2 changed files with 7 additions and 3 deletions

View File

@@ -343,10 +343,13 @@ class Event(models.Model, RevisionMixin):
@property
def display_id(self):
if self.is_rig:
return str("N%05d" % self.pk)
if self.pk:
if self.is_rig:
return str("N%05d" % self.pk)
else:
return self.pk
else:
return self.pk
return "????"
# Calculated values
"""

View File

@@ -151,6 +151,7 @@ class EventDuplicate(EventUpdate):
# Clear checked in by if it's a dry hire
if new.dry_hire is True:
new.checked_in_by = None
new.collector = None
# Remove all the authorisation information from the new event
new.auth_request_to = ''