mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
Return elapsed as number instead of string for unified job subclasses.
This commit is contained in:
parent
bfb0159083
commit
702e575ecf
@ -322,6 +322,12 @@ class UnifiedJobSerializer(BaseSerializer):
|
|||||||
res['schedule'] = obj.schedule.get_absolute_url()
|
res['schedule'] = obj.schedule.get_absolute_url()
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
def to_native(self, obj):
|
||||||
|
ret = super(UnifiedJobSerializer, self).to_native(obj)
|
||||||
|
if 'elapsed' in ret:
|
||||||
|
ret['elapsed'] = float(ret['elapsed'])
|
||||||
|
return ret
|
||||||
|
|
||||||
|
|
||||||
class BaseTaskSerializer(BaseSerializer):
|
class BaseTaskSerializer(BaseSerializer):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user