Update some vie

This commit is contained in:
ibuler
2016-10-27 19:35:02 +08:00
parent c0de35a683
commit 3c00c578c3
4 changed files with 126 additions and 4 deletions

View File

@@ -18,7 +18,10 @@ class ProxyLogSerializer(serializers.ModelSerializer):
@staticmethod
def get_time(obj):
return timesince(obj.date_start, since=obj.date_finished)
if not obj.is_finished:
return ''
else:
return timesince(obj.date_start, since=obj.date_finished)
@staticmethod
def get_command_length(obj):