Skip to content

Commit 33b2e53

Browse files
Your Namealphatownsman
authored andcommitted
fix query when search posts
1 parent 435c1dc commit 33b2e53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

journal/search/index.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ def posts(self) -> QuerySet[Post]:
229229
],
230230
[],
231231
)
232-
select = {f"id_{i}": f"id={i}" for i in ids}
232+
tbl = Post._meta.db_table
233+
select = {f"id_{i}": f"{tbl}.id={i}" for i in ids}
233234
order = [f"-id_{i}" for i in ids]
234235
ps = (
235236
Post.objects.filter(pk__in=ids)

0 commit comments

Comments
 (0)