Skip to content

Commit

Permalink
Added some error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglemansweep committed Feb 25, 2024
1 parent 9dd56b1 commit f9960c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wideboy/systems/scene/entity_tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ class CellDateDogsFleaTreatment(GridCell):

@property
def label(self):
if "state" not in self.entity_state:
if "day" not in self.entity_state or "month" not in self.entity_state:
return "N/A"
return f"{self.entity_state['day']}/{self.entity_state['month']}"

Expand All @@ -632,7 +632,7 @@ class CellDateDogsWormTreatment(GridCell):

@property
def label(self):
if "state" not in self.entity_state:
if "day" not in self.entity_state or "month" not in self.entity_state:
return "N/A"
return f"{self.entity_state['day']}/{self.entity_state['month']}"

Expand Down

0 comments on commit f9960c5

Please sign in to comment.