mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
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
This commit is contained in:
@@ -343,10 +343,13 @@ class Event(models.Model, RevisionMixin):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def display_id(self):
|
def display_id(self):
|
||||||
if self.is_rig:
|
if self.pk:
|
||||||
return str("N%05d" % self.pk)
|
if self.is_rig:
|
||||||
|
return str("N%05d" % self.pk)
|
||||||
|
else:
|
||||||
|
return self.pk
|
||||||
else:
|
else:
|
||||||
return self.pk
|
return "????"
|
||||||
|
|
||||||
# Calculated values
|
# Calculated values
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user