Skip to content

Commit 5e5e117

Browse files
committed
fix query for int primary key
Signed-off-by: wiseaidev <business@wiseai.dev>
1 parent a8f1afe commit 5e5e117

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

aredis_om/model/model.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,10 @@ def resolve_value(
563563
separator_char,
564564
)
565565
return ""
566-
if separator_char in value:
566+
if isinstance(value, int):
567+
# This if will hit only if the field is prinary key of type int
568+
result = f"@{field_name}:[{value} {value}]"
569+
elif separator_char in value:
567570
# The value contains the TAG field separator. We can work
568571
# around this by breaking apart the values and unioning them
569572
# with multiple field:{} queries.

0 commit comments

Comments
 (0)