Skip to content

Commit

Permalink
Fix bug leading to start_time not being returned
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Oct 11, 2024
1 parent 8cffd06 commit e875b40
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def check_time_difference(cls, end_time: datetime, info: ValidationInfo):
delta = end_time - start_time
if delta.total_seconds() < 0:
raise ValueError("invalid start and end time")
return end_time


class OONIFindingWithText(OONIFinding):
Expand Down
1 change: 0 additions & 1 deletion ooniapi/services/oonifindings/tests/test_oonifindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ def test_oonifinding_create(client, client_with_hashed_email, client_with_user_r
r = client.get(f"api/v1/incidents/show/{incident_id}")
assert r.status_code == 200
j = r.json()
print(j)
assert j["incident"]["themes"] == ["social_media"]
assert j["incident"]["start_time"] == sample_start_time
assert j["incident"]["end_time"] == sample_end_time
Expand Down

0 comments on commit e875b40

Please sign in to comment.