Skip to content

Commit

Permalink
new filter value
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Aug 29, 2017
1 parent dabd4b7 commit cecde30
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/appier_extras/parts/admin/part.py
Original file line number Diff line number Diff line change
Expand Up @@ -1914,11 +1914,10 @@ def _find_context(self, cls, *args, **kwargs):
"""

view = self.field("view", None)
context = self.field("context", [], cast = list)
kwargs = self._apply_view(view, kwargs, cls = cls)
if not context: return cls.find(*args, **kwargs)
ids = [self.get_adapter().object_id(_id) for _id in context if _id]
return cls.find(_id = {"$in" : ids}, *args, **kwargs)
object = appier.get_object(alias = True, find = True)
kwargs.update(object)
return cls.find(*args, **kwargs)

def _apply_view(self, view, kwargs, cls = None):
"""
Expand Down

0 comments on commit cecde30

Please sign in to comment.