Skip to content

Commit

Permalink
Support for Nones in code_to_english
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMadBug committed Jul 9, 2024
1 parent 67ff57a commit a829f4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion uicore/templatetags/english_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,7 @@ def plural(items: Union[list, QuerySet, int], singular: str = "", plural: str =


@register.filter()
def code_to_english(text: str):
def code_to_english(text: Optional[str]):
if text is None:
return ""
return pretty_label(text)

0 comments on commit a829f4c

Please sign in to comment.