Skip to content
1 change: 0 additions & 1 deletion docs/actions/meeting.create.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ The field `is_active_in_organization_id` is set to the organization_id.

If a meeting is created,
* `motion_poll_default_type` is `pseudoanonymous`
* `motion_poll_default_method` is `YNA`
* `assignment_poll_default_type` is `pseudoanonymous`
* `assignment_poll_default_method` is `Y`
* `assignment_poll_default_group_ids`, `motion_poll_default_group_ids` and `topic_poll_default_group_ids` have the Delegates group.
Expand Down
3 changes: 0 additions & 3 deletions docs/actions/meeting.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,8 @@
motion_poll_ballot_paper_selection: string;
motion_poll_ballot_paper_number: number;
motion_poll_default_type: string;
motion_poll_default_method: string;
motion_poll_default_onehundred_percent_base: string;
motion_poll_default_group_ids: Id[];
motion_poll_default_backend: string;
motion_poll_projection_name_order_first: string;
motion_poll_projection_max_columns: number;

Expand Down Expand Up @@ -158,7 +156,6 @@
assignment_poll_default_method: string;
assignment_poll_default_onehundred_percent_base: string;
assignment_poll_default_group_ids: Id[];
assignment_poll_default_backend: string;

topic_poll_default_group_ids: Id[];

Expand Down
82 changes: 0 additions & 82 deletions docs/actions/poll.create.md

This file was deleted.

57 changes: 0 additions & 57 deletions docs/actions/poll.update.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/actions/user.merge_together.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ An error is thrown if:
- There are conflicts regarding polls, i.e. two or more of the selected users...
- Any affected meeting_users have groups that are currently entitled to work on any poll
- Any affected meeting_users _who share a meeting_:
- are meeting_users of the poll_config_option on the same poll
- are meeting_users of the poll_option on the same poll
- have voted on the same poll (delegated or not)
- have running speakers
- are in a meeting without `list_of_speakers_allow_multiple_speakers` and have waiting speakers on the same list who cannot be merged together into at most one point_of_order and one normal speech. Speeches may not be merged if there are multiple different values (empty does count) within any of the fields:
Expand Down
77 changes: 0 additions & 77 deletions openslides_backend/action/actions/vote/create.py

This file was deleted.

4 changes: 2 additions & 2 deletions openslides_backend/models/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ def check_timestamp(value: Any) -> bool:
"meeting",
"user",
"mediafile",
"vote",
"poll_ballot",
"poll_config_approval",
"poll_config_selection",
"poll_config_rating_score",
"poll_config_rating_approval",
"poll_config_option",
"poll_option",
}


Expand Down
40 changes: 5 additions & 35 deletions openslides_backend/services/vote/adapter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from enum import StrEnum
from typing import Any, Literal
from typing import Any

import requests
import simplejson as json
Expand Down Expand Up @@ -79,43 +79,13 @@ def make_request(
)
raise VoteServiceException(f"Cannot reach the vote service on {endpoint}.")

def create(self, payload: dict[str, Any]) -> dict[str, Any]:
endpoint = self.get_endpoint()
return self.retrieve(endpoint, payload=payload)

def update(self, id: int, payload: dict[str, Any]) -> dict[str, Any]:
endpoint = self.get_endpoint(id)
return self.retrieve(endpoint, payload=payload)

def delete(self, id: int) -> dict[str, Any]:
endpoint = self.get_endpoint(id)
return self.retrieve(endpoint, RequestMethod.DELETE)

def start(self, id: int) -> dict[str, Any]:
endpoint = self.get_endpoint(id, "start")
return self.retrieve(endpoint)

def finalize(
self,
id: int,
optional_attributes: list[Literal["publish", "anonymize"]] = [],
) -> dict[str, Any]:
endpoint = self.get_endpoint(id, "finalize")
if optional_attributes:
endpoint += f"?{'&'.join(optional_attributes)}"
return self.retrieve(endpoint)

def reset(self, id: int) -> dict[str, Any]:
endpoint = self.get_endpoint(id, "reset")
return self.retrieve(endpoint)

def vote(self, id: int, payload: dict[str, Any]) -> dict[str, Any]:
endpoint = self.get_endpoint(id, "vote")
return self.retrieve(endpoint, payload=payload)

def get_endpoint(self, id: int | None = None, route: str | None = None) -> str:
return (
f"{self.url}/poll"
+ (f"/{id}" if id else "")
+ (f"/{route}" if route else "")
)

def delete(self, id: int) -> dict[str, Any]:
endpoint = self.get_endpoint(id)
return self.retrieve(endpoint, RequestMethod.DELETE)
22 changes: 1 addition & 21 deletions openslides_backend/services/vote/interface.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from abc import abstractmethod
from typing import Any, Literal, Protocol
from typing import Any, Protocol

from ..shared.authenticated_service import AuthenticatedServiceInterface

Expand All @@ -9,25 +9,5 @@ class VoteService(AuthenticatedServiceInterface, Protocol):
Interface of the vote service.
"""

@abstractmethod
def create(self, payload: dict[str, Any]) -> dict[str, Any]: ...

@abstractmethod
def update(self, id: int, payload: dict[str, Any]) -> dict[str, Any]: ...

@abstractmethod
def delete(self, id: int) -> dict[str, Any]: ...

@abstractmethod
def start(self, id: int) -> dict[str, Any]: ...

@abstractmethod
def finalize(
self, id: int, optional_attributes: list[Literal["publish", "anonymize"]] = []
) -> dict[str, Any]: ...

@abstractmethod
def reset(self, id: int) -> dict[str, Any]: ...

@abstractmethod
def vote(self, id: int, payload: dict[str, Any]) -> dict[str, Any]: ...
Loading
Loading