Skip to content

Commit 83e964f

Browse files
committed
hotfix: get_rows and int(val) invocation when appending stmnt variable
1 parent 127512c commit 83e964f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

sqlmodel_crud_utils/a_sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ async def get_rows(
270270
if isinstance(val, str) and val.isdigit()
271271
else val
272272
)
273-
stmnt = stmnt.where(getattr(model, model_key) > int(val))
273+
stmnt = stmnt.where(getattr(model, model_key) > val)
274274
sort_desc, sort_field = (
275275
kwargs.pop(x, None) for x in ("sort_desc", "sort_field")
276276
)

sqlmodel_crud_utils/sync.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def get_rows(
252252
if isinstance(val, str) and val.isdigit()
253253
else val
254254
)
255-
stmnt = stmnt.where(getattr(model, model_key) < int(val))
255+
stmnt = stmnt.where(getattr(model, model_key) < val)
256256
elif "__gte" in key:
257257
model_key = key.replace("__gte", "")
258258
val = kwargs.pop(key)
@@ -267,7 +267,7 @@ def get_rows(
267267
if isinstance(val, str) and val.isdigit()
268268
else val
269269
)
270-
stmnt = stmnt.where(getattr(model, model_key) > int(val))
270+
stmnt = stmnt.where(getattr(model, model_key) > val)
271271
sort_desc, sort_field = (
272272
kwargs.pop(x, None) for x in ("sort_desc", "sort_field")
273273
)

0 commit comments

Comments
 (0)