Skip to content

Commit

Permalink
fix: has_injuries thoughts
Browse files Browse the repository at this point in the history
  • Loading branch information
larkgz committed Dec 27, 2024
1 parent ac66196 commit 130ec66
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/cat/thoughts.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def cats_fulfill_thought_constraints(
if "m_c" in thought["has_injuries"]:
if main_cat.injuries or main_cat.illnesses:
injuries_and_illnesses = (
main_cat.injuries.keys() + main_cat.injuries.keys()
list(main_cat.injuries.keys()) + list(main_cat.injuries.keys())
)
if (
not [
Expand All @@ -232,12 +232,13 @@ def cats_fulfill_thought_constraints(
and "any" not in thought["has_injuries"]["m_c"]
):
return False
return False
else:
return False

if "r_c" in thought["has_injuries"] and random_cat:
if random_cat.injuries or random_cat.illnesses:
injuries_and_illnesses = (
random_cat.injuries.keys() + random_cat.injuries.keys()
list(random_cat.injuries.keys()) + list(random_cat.injuries.keys())
)
if (
not [
Expand All @@ -248,7 +249,8 @@ def cats_fulfill_thought_constraints(
and "any" not in thought["has_injuries"]["r_c"]
):
return False
return False
else:
return False

if "perm_conditions" in thought:
if "m_c" in thought["perm_conditions"]:
Expand Down

0 comments on commit 130ec66

Please sign in to comment.