Skip to content

Commit fb988ed

Browse files
author
hkuepers
committed
Set value_type of entity directly in from_proto
Signed-off-by: hkuepers <hanno.kuepers@ratepay.com>
1 parent e25ca4f commit fb988ed

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sdk/python/feast/entity.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,12 @@ def from_proto(cls, entity_proto: EntityProto):
173173
entity = cls(
174174
name=entity_proto.spec.name,
175175
join_keys=[entity_proto.spec.join_key],
176+
value_type=ValueType(entity_proto.spec.value_type),
176177
description=entity_proto.spec.description,
177178
tags=dict(entity_proto.spec.tags),
178179
owner=entity_proto.spec.owner,
179180
)
180181

181-
entity.value_type = ValueType(entity_proto.spec.value_type)
182-
183182
if entity_proto.meta.HasField("created_timestamp"):
184183
entity.created_timestamp = entity_proto.meta.created_timestamp.ToDatetime()
185184
if entity_proto.meta.HasField("last_updated_timestamp"):

0 commit comments

Comments
 (0)