Skip to content

Commit

Permalink
TEST: pytest None type error
Browse files Browse the repository at this point in the history
  • Loading branch information
vliu36 committed Jul 26, 2024
1 parent 6a7759e commit 6a82b1c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions controller/src/mongodb/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
def getColor(uuid: str) -> str:
""" Getter for color state in the DB. Stdout when method is instantiated and the values."""
response = lumongo.findOne({"uuid": uuid}, {"color": 1})
color = response.json()["document"]["color"]
color = response.json()["document"]["color"] if not None else "NONE"
print(f"INFO | GET | COLOR: {color}")
if color is None:
color = "ERRNONE"
return color

def setColor(uuid: str, value: str):
Expand Down

0 comments on commit 6a82b1c

Please sign in to comment.