Commit ffa7e580 authored by ibuler's avatar ibuler

[Bugfix] Terminal status报异常

parent 15f6d5c9
......@@ -23,7 +23,10 @@ class TerminalSerializer(serializers.ModelSerializer):
@staticmethod
def get_is_alive(obj):
status = obj.status_set.latest()
try:
status = obj.status_set.latest()
except Status.DoesNotExist:
status = None
if not status:
return False
......
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