From 7414d1f7a683e3ced7a78ae8ed71318ab52ae9f8 Mon Sep 17 00:00:00 2001 From: rr- Date: Fri, 20 Jan 2017 22:16:42 +0100 Subject: [PATCH] server/posts: fix getting posts around Querying this undocumented API resulted in 500 ISE unless the client asked only for the "id" field. --- server/szurubooru/search/configs/post_search_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/szurubooru/search/configs/post_search_config.py b/server/szurubooru/search/configs/post_search_config.py index b0ea3300..cf02fecc 100644 --- a/server/szurubooru/search/configs/post_search_config.py +++ b/server/szurubooru/search/configs/post_search_config.py @@ -102,7 +102,7 @@ class PostSearchConfig(BaseSearchConfig): search_query.special_tokens = new_special_tokens def create_around_query(self): - return db.session.query(db.Post.post_id) + return db.session.query(db.Post).options(lazyload('*')) def create_filter_query(self, disable_eager_loads): strategy = lazyload if disable_eager_loads else subqueryload