1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Set the private pk after super save

This commit is contained in:
Saria Hajjar
2020-01-13 15:21:37 +00:00
parent 3d78a67343
commit 608006ee77

View File

@ -3141,6 +3141,9 @@ class Cable(ChangeLoggedModel):
super().save(*args, **kwargs)
# Update the private pk used in __str__ in case this is a new object (i.e. just got its pk)
self._pk = self.pk
def to_csv(self):
return (
'{}.{}'.format(self.termination_a_type.app_label, self.termination_a_type.model),