From df7c25cc5d2d05123184bcf7b4eaa4da1207a60e Mon Sep 17 00:00:00 2001 From: Joshua Sangmeister Date: Tue, 6 Apr 2021 11:01:51 +0200 Subject: [PATCH 1/2] Adapt models.yml to new voting changes --- docs/models.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/models.yml b/docs/models.yml index 09e0bbf39..f178545c2 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -1660,6 +1660,7 @@ poll: - YN - YNA - N + is_pseudoanonymized: boolean state: type: string enum: @@ -1693,6 +1694,7 @@ poll: - N - valid - cast + - entitled - disabled majority_method: type: string @@ -1705,6 +1707,7 @@ poll: votesvalid: decimal(6) votesinvalid: decimal(6) votescast: decimal(6) + entitled_users_at_stop: JSON content_object_id: # Note: must not be set - it is allowed to have standalone polls type: generic-relation @@ -1778,6 +1781,9 @@ vote: id: number weight: decimal(6) value: string + user_token: + type: string + required: true option_id: type: relation From 3eee3c1c3745f75f8fb498647c18b4faacd65538 Mon Sep 17 00:00:00 2001 From: Joshua Sangmeister Date: Tue, 6 Apr 2021 11:20:47 +0200 Subject: [PATCH 2/2] Adapt example data --- docs/example-data.json | 19 +++++++++++++++++++ docs/models.yml | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/example-data.json b/docs/example-data.json index f69770a43..cd3344c24 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -1948,6 +1948,7 @@ "title": "1", "description": "", "type": "analog", + "is_pseudoanonymized": false, "pollmethod": "YNA", "state": "finished", "min_votes_amount": 1, @@ -1960,6 +1961,7 @@ "votesvalid": "2.000000", "votesinvalid": "9.000000", "votescast": "2.000000", + "entitled_users_at_stop": null, "content_object_id": "motion/1", "option_ids": [1], @@ -1974,6 +1976,7 @@ "title": "2", "description": "", "type": "analog", + "is_pseudoanonymized": false, "pollmethod": "YNA", "state": "created", "min_votes_amount": 1, @@ -1986,6 +1989,7 @@ "votesvalid": null, "votesinvalid": null, "votescast": null, + "entitled_users_at_stop": null, "content_object_id": "motion/1", "option_ids": [3], @@ -2000,6 +2004,7 @@ "title": "1", "description": "", "type": "analog", + "is_pseudoanonymized": false, "pollmethod": "YNA", "state": "created", "min_votes_amount": 1, @@ -2012,6 +2017,7 @@ "votesvalid": null, "votesinvalid": null, "votescast": null, + "entitled_users_at_stop": null, "content_object_id": "assignment/1", "voted_ids": [], @@ -2026,6 +2032,7 @@ "title": "2", "description": "", "type": "analog", + "is_pseudoanonymized": false, "pollmethod": "Y", "state": "finished", "min_votes_amount": 1, @@ -2038,6 +2045,7 @@ "votesvalid": "9.000000", "votesinvalid": "2.000000", "votescast": "16.000000", + "entitled_users_at_stop": null, "content_object_id": "assignment/1", "voted_ids": [], @@ -2052,6 +2060,7 @@ "title": "Wahlgang", "description": "", "type": "named", + "is_pseudoanonymized": false, "pollmethod": "Y", "state": "finished", "min_votes_amount": 1, @@ -2064,6 +2073,7 @@ "votesvalid": "1.000000", "votesinvalid": "0.000000", "votescast": "1.000000", + "entitled_users_at_stop": null, "content_object_id": "assignment/2", "voted_ids": [1], @@ -2261,6 +2271,7 @@ "id": 1, "weight": "2.000000", "value": "Y", + "user_token": "SNuxJc7W93bnhAiA", "user_id": null, "delegated_user_id": null, @@ -2271,6 +2282,7 @@ "id": 2, "weight": "4.000000", "value": "N", + "user_token": "4bgn4RBjNlIeO7vj", "user_id": null, "delegated_user_id": null, @@ -2281,6 +2293,7 @@ "id": 3, "weight": "1.000000", "value": "A", + "user_token": "xLBFgo3O1pAfGZ0h", "user_id": null, "delegated_user_id": null, @@ -2291,6 +2304,7 @@ "id": 4, "value": "Y", "weight": "3.000000", + "user_token": "neT9r5YkT9U8yJfa", "user_id": null, "delegated_user_id": null, @@ -2301,6 +2315,7 @@ "id": 5, "value": "Y", "weight": "7.000000", + "user_token": "U5YSuLUI1G5rNOHn", "user_id": null, "delegated_user_id": null, @@ -2311,6 +2326,7 @@ "id": 6, "value": "Y", "weight": "2.000000", + "user_token": "jkNKIiJr8Dl0yOXI", "user_id": null, "delegated_user_id": null, @@ -2321,6 +2337,7 @@ "id": 7, "value": "N", "weight": "2.000000", + "user_token": "Z1cxOviuelzPT2rm", "user_id": null, "delegated_user_id": null, @@ -2331,6 +2348,7 @@ "id": 8, "value": "A", "weight": "1.000000", + "user_token": "daUZh16fXCAu5DBL", "user_id": null, "delegated_user_id": null, @@ -2341,6 +2359,7 @@ "id": 9, "value": "Y", "weight": "1.000000", + "user_token": "ivgipZ18D9Xac8pd", "user_id": 1, "delegated_user_id": 1, diff --git a/docs/models.yml b/docs/models.yml index f178545c2..95f9c179f 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -1652,6 +1652,7 @@ poll: - analog - named - pseudoanonymous + is_pseudoanonymized: boolean pollmethod: type: string required: true @@ -1660,7 +1661,6 @@ poll: - YN - YNA - N - is_pseudoanonymized: boolean state: type: string enum: