when retrieving the bindserver object, return the hostname as a string for the object itself
This commit is contained in:
parent
3908e12ca4
commit
01a2d2382c
|
@ -45,7 +45,6 @@ class Key(models.Model):
|
|||
class Meta:
|
||||
ordering = ["name"]
|
||||
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
f = Fernet(settings.FERNET_KEY)
|
||||
crypted_key = f.encrypt(bytes(self.data, encoding="utf8"))
|
||||
|
@ -107,6 +106,9 @@ class BindServer(models.Model):
|
|||
def __unicode__(self):
|
||||
return self.hostname
|
||||
|
||||
def __str__(self):
|
||||
return self.hostname
|
||||
|
||||
class Meta:
|
||||
ordering = ["hostname"]
|
||||
|
||||
|
|
Loading…
Reference in New Issue