Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource: fix container resource not including children
The issue was that the queryset it was building was based on self.model rather than the base class: Model. self.model was just Container, so that meant it ended up building a queryset that included only sublcasses of Container which ... is only Container, so it returned no children at all. Also the super().__init__(request, container) call populates the Resource dict with data from the base object (the Container), so move the children under a list (using the key "children").
- Loading branch information