Skip to content

Commit

Permalink
Make dates_watched get consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
fulder committed Oct 30, 2021
1 parent 0e1a964 commit 835b188
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lambdas/api/episode_by_collection_item/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _post_episode(username, collection_name, item_id, body, token):
special=res["is_special"]
)

if "dates_watched" not in body:
if body.get("dates_watched") is None:
return {
"statusCode": 200,
"body": json.dumps({"id": episode_id})
Expand Down
2 changes: 1 addition & 1 deletion src/lambdas/api/episode_by_id/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _put_episode(username, collection_name, item_id, episode_id, body, token, ap
body
)

if "dates_watched" not in body:
if body.get("dates_watched") is None:
return {"statusCode": 204}

# If episode watch date is changed check if its larger than current
Expand Down

0 comments on commit 835b188

Please sign in to comment.