diff --git a/openslides_backend/action/actions/list_of_speakers/re_add_last.py b/openslides_backend/action/actions/list_of_speakers/re_add_last.py index e1f2e26e2..90bb8d047 100644 --- a/openslides_backend/action/actions/list_of_speakers/re_add_last.py +++ b/openslides_backend/action/actions/list_of_speakers/re_add_last.py @@ -60,6 +60,10 @@ def update_instance(self, instance: Dict[str, Any]) -> Dict[str, Any]: last_speaker_id, last_speaker = speaker_id, speaker if last_speaker is None: raise ActionException("There is no last speaker that can be re-added.") + elif last_speaker.get("point_of_order"): + raise ActionException( + "The last speaker is a point of order speaker and cannot be re-added." + ) assert isinstance(lowest_weight, int) for speaker in speakers.values(): @@ -83,7 +87,5 @@ def update_instance(self, instance: Dict[str, Any]) -> Dict[str, Any]: "id": last_speaker_id, "begin_time": None, "end_time": None, - "point_of_order": None, - "point_of_order_category_id": None, "weight": lowest_weight - 1, } diff --git a/tests/system/action/list_of_speakers/test_re_add_last.py b/tests/system/action/list_of_speakers/test_re_add_last.py index ba7f45114..dfb24d355 100644 --- a/tests/system/action/list_of_speakers/test_re_add_last.py +++ b/tests/system/action/list_of_speakers/test_re_add_last.py @@ -241,17 +241,10 @@ def test_last_speaker_poos(self) -> None: } ) response = self.request("list_of_speakers.re_add_last", {"id": 111}) - self.assert_status_code(response, 200) - self.assert_model_exists( - "speaker/223", - { - "list_of_speakers_id": 111, - "meeting_user_id": 42, - "begin_time": None, - "end_time": None, - "point_of_order": None, - "meeting_id": 222, - }, + self.assert_status_code(response, 400) + assert ( + "The last speaker is a point of order speaker and cannot be re-added." + in response.json["message"] ) def test_last_speaker_also_in_waiting_list(self) -> None: