Skip to content

Commit

Permalink
fix for official build
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsumoto-ren committed Jul 24, 2024
1 parent 2ae676f commit 88aeb4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion japanese/helpers/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ def replace_from_config_dict(self, profile_dict):

def flag_as_comma_separated_list(flag: enum.Flag):
assert isinstance(flag, enum.Enum)
return ",".join(str(item.name) for item in flag)
return ",".join(str(item.name) for item in type(flag) if item in flag)
# note: `item.name for item in flag` won't work on the official Anki build that is still on python 3.9


def flag_from_comma_separated_list(flag_type: enum.EnumMeta, comma_separated_flags: str) -> enum.Flag:
Expand Down

0 comments on commit 88aeb4d

Please sign in to comment.