修改bug

pull/6/head
ibuler 2015-01-01 08:44:46 +08:00
parent 2eaf6d7d81
commit d1358b3d4f
1 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ def set_win_size(sig, data):
def get_object(model, **kwargs):
try:
the_object = model.objects.get(kwargs)
the_object = model.objects.get(**kwargs)
except ObjectDoesNotExist:
raise ServerError('Object get %s failed.' % str(kwargs.values()))
return the_object
@ -220,7 +220,7 @@ def get_user_host(username):
def get_connect_item(username, ip):
cryptor = PyCrypt(KEY)
asset = Asset.objects.get(Asset, ip=ip)
asset = get_object(Asset, ip=ip)
port = asset.port
if not asset.is_active: