pull/530/head
ibuler 2016-12-21 01:03:52 +08:00
parent 649509dec1
commit 589b6d7cfe
1 changed files with 3 additions and 1 deletions

View File

@ -73,6 +73,8 @@ class Asset(models.Model):
def __unicode__(self): def __unicode__(self):
return '%(ip)s:%(port)s' % {'ip': self.ip, 'port': self.port} return '%(ip)s:%(port)s' % {'ip': self.ip, 'port': self.port}
__str__ = __unicode__()
@property @property
def is_valid(self): def is_valid(self):
warning = '' warning = ''
@ -82,7 +84,7 @@ class Asset(models.Model):
return True, '' return True, ''
return False, warning return False, warning
def json(self): def to_json(self):
pass pass
class Meta: class Meta: