Skip to content

Commit 5d1b4fe

Browse files
committed
sql
Signed-off-by: Tommy Hughes <tohughes@redhat.com>
1 parent 16317d0 commit 5d1b4fe

File tree

1 file changed

+5
-7
lines changed
  • sdk/python/feast/infra/registry

1 file changed

+5
-7
lines changed

sdk/python/feast/infra/registry/sql.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -829,15 +829,13 @@ def _list_objects(
829829
stmt = select(table).where(table.c.project_id == project)
830830
rows = conn.execute(stmt).all()
831831
if rows:
832-
objects = [
833-
python_class.from_proto(
832+
objects = []
833+
for row in rows:
834+
obj = python_class.from_proto(
834835
proto_class.FromString(row._mapping[proto_field_name])
835836
)
836-
for row in rows
837-
]
838-
for obj in objects:
839-
if not utils.has_all_tags(obj.tags, tags):
840-
objects.remove(obj)
837+
if utils.has_all_tags(obj.tags, tags):
838+
objects.append(obj)
841839
return objects
842840
return []
843841

0 commit comments

Comments
 (0)