mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Fix for a situation that should be impossible
This commit is contained in:
@@ -148,7 +148,7 @@ class Asset(models.Model, RevisionMixin):
|
||||
|
||||
def __str__(self):
|
||||
out = str(self.asset_id) + ' - ' + self.description
|
||||
if self.is_cable:
|
||||
if self.is_cable and self.cable_type is not None:
|
||||
out += '{} - {}m - {}'.format(self.cable_type.plug, self.length, self.cable_type.socket)
|
||||
return out
|
||||
|
||||
|
||||
Reference in New Issue
Block a user