mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-19 22:42:17 +00:00
Big pile of minor code cleanups
This commit is contained in:
@@ -79,7 +79,7 @@ class CableType(models.Model):
|
||||
|
||||
def __str__(self):
|
||||
if self.plug and self.socket:
|
||||
return "%s → %s" % (self.plug.description, self.socket.description)
|
||||
return f"{self.plug.description} → {self.socket.description}"
|
||||
else:
|
||||
return "Unknown"
|
||||
|
||||
@@ -148,7 +148,7 @@ class Asset(models.Model, RevisionMixin):
|
||||
]
|
||||
|
||||
def __str__(self):
|
||||
return "{} | {}".format(self.asset_id, self.description)
|
||||
return f"{self.asset_id} | {self.description}"
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse('asset_detail', kwargs={'pk': self.asset_id})
|
||||
|
||||
Reference in New Issue
Block a user