Skip to content

Commit

Permalink
Ensure that only None types fail predicate (#1580)
Browse files Browse the repository at this point in the history
* Ensure that only None types fail predicate

Signed-off-by: Willem Pienaar <[email protected]>

* Fix lint

Signed-off-by: Willem Pienaar <[email protected]>
  • Loading branch information
woop authored and jklegar committed May 27, 2021
1 parent 1818042 commit 5417525
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sdk/python/feast/type_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@ def _python_value_to_proto_value(feast_value_type, value) -> ProtoValue:
def python_value_to_proto_value(
value: Any, feature_type: ValueType = None
) -> ProtoValue:
value_type = python_type_to_feast_value_type("", value) if value else feature_type
value_type = (
python_type_to_feast_value_type("", value)
if value is not None
else feature_type
)
return _python_value_to_proto_value(value_type, value)


Expand Down

0 comments on commit 5417525

Please sign in to comment.