Commit d1358b3d authored by ibuler's avatar ibuler

修改bug

parent 2eaf6d7d
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment