diff --git a/openslides/motions/models.py b/openslides/motions/models.py index 29efe2159..60e9a15dc 100644 --- a/openslides/motions/models.py +++ b/openslides/motions/models.py @@ -507,6 +507,10 @@ class Motion(RESTModelMixin, models.Model): """ if self.recommendation is not None: self.set_state(self.recommendation) + if (self.recommendation_extension is not None + and self.state.show_state_extension_field + and self.recommendation.show_recommendation_extension_field): + self.state_extension = self.recommendation_extension """ Container for runtime information for agenda app (on create or update of this instance). diff --git a/openslides/motions/views.py b/openslides/motions/views.py index 1ef9237f1..2d1e2604d 100644 --- a/openslides/motions/views.py +++ b/openslides/motions/views.py @@ -827,13 +827,7 @@ class MotionViewSet(ModelViewSet): if motion.recommendation is None: raise ValidationError({"detail": "Cannot set an empty recommendation."}) - # Set state. - motion.set_state(motion.recommendation) - - # Set the special state comment. - extension = request.data.get("state_extension") - if extension is not None: - motion.state_extension = extension + motion.follow_recommendation() # Save and write log. motion.save(