Skip to content

Commit

Permalink
Fix connections from non-admin users.
Browse files Browse the repository at this point in the history
  • Loading branch information
vangorra committed Jul 2, 2020
1 parent 80f1b0e commit 46fd13d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gogogate2_api/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class Door(NamedTuple):
sensor: bool
sensorid: Optional[str]
camera: bool
events: int
events: Optional[int]
temperature: Optional[float]


Expand Down Expand Up @@ -272,7 +272,7 @@ def door_or_raise(door_id: int, element: Element) -> Door:
sensor=element_text_or_raise(element, "sensor").lower() == "yes",
sensorid=element_text_or_none(element, "sensorid"),
camera=element_text_or_raise(element, "camera").lower() == "yes",
events=int_or_raise(element_text_or_raise(element, "events")),
events=int_or_none(element_text_or_none(element, "events")),
temperature=None if temp is None else None if temp < -100000 else temp,
)

Expand Down

0 comments on commit 46fd13d

Please sign in to comment.