openfun / richie

:pencil: An opensource CMS to build education portals
https://richie.education
MIT License
260 stars 84 forks source link

🐛(backend) fix Category.get_children_categories in public mode #2427

Closed jbpenrath closed 3 months ago

jbpenrath commented 3 months ago

Purpose

Currently, calling get_children_categories for a published category return all category children even draft ones. In order to prevent that, if the category is not in draft, we explicitly exclude unpublished categories.

igobranco commented 3 months ago

@jbpenrath I can't reproduce the problem on the demo site, so I'm having difficult to give you feedback on this PR.