diff --git a/froide_govplan/models.py b/froide_govplan/models.py index 6f97da4..1319267 100644 --- a/froide_govplan/models.py +++ b/froide_govplan/models.py @@ -481,7 +481,6 @@ class GovernmentPlanSection(models.Model): if CMSPlugin: - PLUGIN_TEMPLATES = [ ("froide_govplan/plugins/default.html", _("Normal")), ("froide_govplan/plugins/progress.html", _("Progress")), @@ -594,6 +593,12 @@ if CMSPlugin: help_text=_("number of updates to skip from top of list"), ) + def copy_relations(self, old_instance): + """ + Duplicate ManyToMany relations on plugin copy + """ + self.categories.set(old_instance.categories.all()) + def get_updates(self, request, published_only=True): # TODO: remove duplication with GovernmentPlansCMSPlugin.get_plans if (