Skip to content

Commit 1d2cacb

Browse files
committed
Hotfix payload selection
1 parent bda1c7f commit 1d2cacb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

business_objects/embedding.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ def __build_payload_selector(
312312
) -> str:
313313
# empty json object to extend by label data later
314314
payload_selector = "jsonb_build_object()"
315-
316315
if attributes_to_include and len(attributes_to_include) > 0:
317316
payload_selector = ""
318317
for attr, data_type in attributes_to_include.items():
@@ -324,7 +323,7 @@ def __build_payload_selector(
324323
and data_type != enums.DataTypes.PERMISSION.value
325324
):
326325
payload_selector += f"'{attr}', (r.\"data\"->>'{attr}')::{data_type}"
327-
if data_type == enums.DataTypes.PERMISSION.value:
326+
elif data_type == enums.DataTypes.PERMISSION.value:
328327
payload_selector += f"'{attr}', r.\"data\"->'{attr}'"
329328
else:
330329
payload_selector += f"'{attr}', r.\"data\"->>'{attr}'"

0 commit comments

Comments
 (0)