mirror of https://github.com/jumpserver/jumpserver
[Bugfix] Terminal status报异常
parent
15f6d5c9c0
commit
ffa7e58025
|
@ -23,7 +23,10 @@ class TerminalSerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_is_alive(obj):
|
def get_is_alive(obj):
|
||||||
status = obj.status_set.latest()
|
try:
|
||||||
|
status = obj.status_set.latest()
|
||||||
|
except Status.DoesNotExist:
|
||||||
|
status = None
|
||||||
|
|
||||||
if not status:
|
if not status:
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue