Skip to content

Commit

Permalink
Permissive casting of values
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Apr 15, 2019
1 parent 7630308 commit 0540103
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/quorum/model.py
Expand Up @@ -1832,7 +1832,9 @@ def _find_d(cls, kwargs):
# the string based value into the target specific value for the query
# otherwise uses the data type for the search field for value conversion
if value_method: value = value_method(value, name_t)
else: value = name_t(value)
else:
try: value = name_t(value)
except ValueError: value = None

# constructs the custom find value using a key and value map value
# in case the operator is defined otherwise (operator not defined)
Expand Down

0 comments on commit 0540103

Please sign in to comment.