Skip to content

Commit

Permalink
serialize duration as int
Browse files Browse the repository at this point in the history
  • Loading branch information
jeriox committed Mar 16, 2024
1 parent 3ce5d3a commit 141c858
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ephios/api/views/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ def build_unknown_field(self, field_name, model_class):
return super().build_unknown_field(field_name, model_class)

def get_duration(self, obj):
return float((obj.end_time - obj.start_time).total_seconds())
return round((obj.end_time - obj.start_time).total_seconds())

0 comments on commit 141c858

Please sign in to comment.