Switched URL to use asset_id rather than the database ID

This commit is contained in:
Matthew Smith
2019-12-04 20:13:09 +00:00
parent c4cad76653
commit 15acc02f74
8 changed files with 33 additions and 21 deletions

View File

@@ -100,7 +100,7 @@ class Asset(models.Model):
return row[0]
def get_absolute_url(self):
return reverse('asset_detail', kwargs={'pk': self.pk})
return reverse('asset_detail', kwargs={'pk': self.asset_id})
def __str__(self):
out = str(self.asset_id) + ' - ' + self.description