mirror of
https://github.com/solero/houdini.git
synced 2024-11-10 05:08:19 +00:00
Remove join on parent models for inventories
This commit is contained in:
parent
0b60c5716e
commit
d31105ac29
@ -28,7 +28,7 @@ class BaseCrumbsCollection(dict):
|
|||||||
try:
|
try:
|
||||||
return self[k]
|
return self[k]
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
query = self._inventory_model.load(parent=self._model).where(
|
query = self._inventory_model.query.where(
|
||||||
(self._inventory_key_column == self._inventory_id) & (self._inventory_value_column == k)
|
(self._inventory_key_column == self._inventory_id) & (self._inventory_value_column == k)
|
||||||
) if self._is_inventory else self._model.query.where(self._model_key_column == k)
|
) if self._is_inventory else self._model.query.where(self._model_key_column == k)
|
||||||
result = await query.gino.first()
|
result = await query.gino.first()
|
||||||
@ -58,7 +58,7 @@ class BaseCrumbsCollection(dict):
|
|||||||
del self[k]
|
del self[k]
|
||||||
|
|
||||||
async def __collect(self):
|
async def __collect(self):
|
||||||
query = self._inventory_model.load(parent=self._model).where(
|
query = self._inventory_model.query.where(
|
||||||
self._inventory_key_column == self._inventory_id
|
self._inventory_key_column == self._inventory_id
|
||||||
) if self._is_inventory else self._model.query
|
) if self._is_inventory else self._model.query
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user