wainuiomata / sambal

Experimental web admin for Samba and Active Directory domains
https://wainuiomata.com
GNU General Public License v3.0
1 stars 1 forks source link

resource: fix container resource not including children #42

Closed robvdl closed 8 months ago

robvdl commented 8 months ago

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").

Closes #41