Commit 160b01ec authored by ibuler's avatar ibuler

Merge branch 'new_api' into ops

parents 17ddb3bb ffa7e580
...@@ -23,7 +23,10 @@ class TerminalSerializer(serializers.ModelSerializer): ...@@ -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
......
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