Skip to content
Snippets Groups Projects
Commit e38932a0 authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Make "both" a valid direction

parent e5263301
Branches config
No related tags found
No related merge requests found
......@@ -108,7 +108,7 @@ def is_valid_data(data: dict) -> bool:
Check if the body data of the request is valid
"""
expected_keys = ["location", "entrance", "direction", "id"]
expected_directions = ["in", "out"]
expected_directions = ["in", "out", "both"]
has_all_keys = all([k in data.keys() for k in expected_keys ])
# Check if all needed keys are contained
......@@ -305,7 +305,7 @@ def filter_current_visitors(visitors: list, hours: int=24) -> list:
last_movement = None
if len(incomings) == 0:
if len(incomings) == 0
# Visitor was only moving out in the last 24h, so they are not here
continue
elif not len(outgoings) == 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment