Commit 045683bc authored by Iurii Ogiienko's avatar Iurii Ogiienko

fixed joins appending for sqlalchemy

parent be2cec68
...@@ -484,7 +484,8 @@ class ModelView(BaseModelView): ...@@ -484,7 +484,8 @@ class ModelView(BaseModelView):
if self._search_supported and search: if self._search_supported and search:
# Apply search-related joins # Apply search-related joins
if self._search_joins: if self._search_joins:
query = query.join(*self._search_joins.values()) for j in self._search_joins.values():
query = query.join(j)
joins = set(self._search_joins.keys()) joins = set(self._search_joins.keys())
# Apply terms # Apply terms
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment