server/posts: fix getting posts around
Querying this undocumented API resulted in 500 ISE unless the client asked only for the "id" field.
This commit is contained in:
parent
eead1560ee
commit
7414d1f7a6
|
@ -102,7 +102,7 @@ class PostSearchConfig(BaseSearchConfig):
|
||||||
search_query.special_tokens = new_special_tokens
|
search_query.special_tokens = new_special_tokens
|
||||||
|
|
||||||
def create_around_query(self):
|
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):
|
def create_filter_query(self, disable_eager_loads):
|
||||||
strategy = lazyload if disable_eager_loads else subqueryload
|
strategy = lazyload if disable_eager_loads else subqueryload
|
||||||
|
|
Loading…
Reference in New Issue