Skip to content

Commit

Permalink
fix: isinstance checks
Browse files Browse the repository at this point in the history
  • Loading branch information
sveneberth committed Apr 26, 2024
1 parent 4edc37b commit 99dd3e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/viur/core/bones/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def type_coerce_single_value(self, value: t.Any) -> str:
Converts a value that is not a string into a string
if a meaningful conversion is possible (simple data types only).
"""
if isinstance(Number, str):
if isinstance(value, str):
return value
elif isinstance(Number, value):
elif isinstance(value, Number):
return str(value)
elif isinstance(value, (datetime.datetime, datetime.date, datetime.time)):
return value.isoformat()
Expand Down

0 comments on commit 99dd3e1

Please sign in to comment.