Skip to content

Commit

Permalink
Make behavior day optional
Browse files Browse the repository at this point in the history
  • Loading branch information
bjhardcastle committed Dec 6, 2023
1 parent 9f395fb commit a15c39d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/npc_lims/status/tracked_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ def cloud_path(self) -> upath.UPath | None:
return None

@functools.cached_property
def behavior_day(self) -> int:
def behavior_day(self) -> int | None:
if self.is_templeton:
raise AttributeError("`behavior_day` is not defined for Templeton sessions")
return self.training_info["ID"] # row of training spreadsheet
return self.training_info.get("ID") # row of training spreadsheet

@functools.cached_property
def is_uploaded(self) -> bool:
Expand Down

0 comments on commit a15c39d

Please sign in to comment.