when retrieving the bindserver object, return the hostname as a string for the object itself

This commit is contained in:
jeffrey forman 2019-02-14 19:57:17 -05:00
parent 3908e12ca4
commit 01a2d2382c
1 changed files with 3 additions and 1 deletions

View File

@ -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"]