From 1c857fb08c34bb2f93af129f350343af59e63fdf Mon Sep 17 00:00:00 2001 From: Finn Stutzenstein Date: Fri, 9 Jul 2021 08:18:31 +0200 Subject: [PATCH] Fix exporter poll ids were used for options --- server/openslides/core/export.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/server/openslides/core/export.py b/server/openslides/core/export.py index 35d2c315a..fb34448ed 100644 --- a/server/openslides/core/export.py +++ b/server/openslides/core/export.py @@ -280,18 +280,10 @@ class OS4Exporter: motion_vote["id"] += self.motion_vote_id_offset motion_vote["option_id"] += self.motion_option_id_offset - self.poll_id_counter = ( - max_or_zero([x["id"] for x in self.get_collection("motions/motion-poll")]) - + 1 - ) self.option_id_counter = ( max_or_zero([x["id"] for x in self.get_collection("motions/motion-option")]) + 1 ) - self.vote_id_counter = ( - max_or_zero([x["id"] for x in self.get_collection("motions/motion-vote")]) - + 1 - ) def migrate_agenda_items(self): for old in self.get_collection("agenda/item"): @@ -456,8 +448,8 @@ class OS4Exporter: self.set_model("poll", new) def create_global_option(self, poll): - id = self.poll_id_counter - self.poll_id_counter += 1 + id = self.option_id_counter + self.option_id_counter += 1 option = { "id": id, "weight": 1,