Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
23ffe19
Bump gunicorn (#3732)
dependabot[bot] Sep 1, 2026
9370389
Bump isort from 8.0.1 to 9.0.1 in /requirements/partial in the code-s…
dependabot[bot] Sep 1, 2026
02c4ec8
Update meta repository (#3741)
openslides-automation[bot] Sep 1, 2026
abcf69a
Bump pypdf from 6.16.1 to 6.16.2 in /requirements/partial (#3730)
dependabot[bot] Sep 1, 2026
69bccf4
Fix tracebacks (#3759)
luisa-beerboom Sep 16, 2026
b61ba63
Participant import rework (#3688)
luisa-beerboom Sep 16, 2026
ffeea37
log wrong data type send by idp and allow lists for groups and struct…
hjanott Sep 22, 2026
72f7946
Bump the opentelemetry-dependencies group (#3780)
dependabot[bot] Sep 29, 2026
32b5278
Bump pypdf from 6.16.2 to 6.19.0 in /requirements/partial (#3771)
dependabot[bot] Sep 29, 2026
6e81a91
Bump types-pyyaml (#3753)
dependabot[bot] Sep 29, 2026
644d32b
Bump the database-dependencies group across 1 directory with 2 update…
dependabot[bot] Sep 29, 2026
4984c45
Bump types-requests (#3752)
dependabot[bot] Sep 29, 2026
7ada416
Bump the code-style-depedencies group across 1 directory with 2 updat…
dependabot[bot] Sep 29, 2026
fbfd456
Update meta repository (#3781)
openslides-automation[bot] Sep 29, 2026
4389543
Make get_many always filter out None values (#3761)
luisa-beerboom Sep 30, 2026
531ae79
Use more restrictive Scope definition and check OML hierarchy for bas…
luisa-beerboom Oct 9, 2026
eb0e487
Revert "Update meta repository (#3781)"
Oct 9, 2026
003a3f6
Bump the web-dependencies group across 1 directory with 2 updates (#3…
dependabot[bot] Oct 12, 2026
4698436
Bump the code-style-depedencies group across 1 directory with 3 updat…
dependabot[bot] Oct 12, 2026
612c6fc
Bump sqlfluff (#3789)
dependabot[bot] Oct 12, 2026
4a93b68
Bump the general-dependencies group across 1 directory with 2 updates…
dependabot[bot] Oct 12, 2026
b132bc8
Update meta repository (#3797)
m-schieder Oct 12, 2026
4beecea
Bump pypdf from 6.19.0 to 6.20.0 in /requirements/partial (#3800)
dependabot[bot] Oct 14, 2026
6b6a829
Bump the opentelemetry-dependencies group across 1 directory with 7 u…
dependabot[bot] Oct 14, 2026
2fc7132
Bump the code-style-depedencies group across 1 directory with 2 updat…
dependabot[bot] Oct 14, 2026
504d894
Update meta repository (#3802)
openslides-automation[bot] Oct 14, 2026
e0e57d5
Remove timezone presenter (#3803)
luisa-beerboom Oct 16, 2026
5fd31e8
Try to fix pyupgrade check (#3805)
luisa-beerboom Oct 16, 2026
f7b84b5
Update meta repository (#3807)
openslides-automation[bot] Oct 16, 2026
e306d59
Increase MIN_NON_REL_MIGRATION (#3804)
luisa-beerboom Oct 16, 2026
b0d269f
Fix forbid anonymous group mixin (#3810)
hjanott Oct 19, 2026
7fb79be
Bump pypdf from 6.20.0 to 6.21.3 in /requirements/partial (#3825)
dependabot[bot] Nov 2, 2026
457277d
Bump pip-check (#3817)
dependabot[bot] Nov 2, 2026
54824df
Update meta repository (main) (#3827)
openslides-automation[bot] Nov 2, 2026
8480ea1
Bump types-requests (#3832)
dependabot[bot] Nov 3, 2026
bb35f89
Bump the code-style-depedencies group across 1 directory with 2 updat…
dependabot[bot] Nov 3, 2026
23b2293
Bump the general-dependencies group across 1 directory with 2 updates…
dependabot[bot] Nov 3, 2026
fb4bc00
Bump the opentelemetry-dependencies group across 1 directory with 7 u…
dependabot[bot] Nov 3, 2026
f8fdd2b
Bump pytest (#3834)
dependabot[bot] Nov 3, 2026
bb1f5f3
assert finalized and use flag for setting default language (#3837)
hjanott Nov 3, 2026
54594f4
Update meta repository (main) (#3835)
openslides-automation[bot] Nov 3, 2026
1f78710
Do not execute on_success on errors (#3838)
hjanott Nov 3, 2026
2f34bf5
Bump pypdf from 6.21.3 to 6.21.4 in /requirements/partial (#3828)
dependabot[bot] Nov 4, 2026
4723107
Bump sqlfluff (#3839)
dependabot[bot] Nov 4, 2026
fc72d6b
Update meta repository (#3841)
openslides-automation[bot] Nov 4, 2026
28a4f1c
Add cycle creation tests to agenda_item test_assign (#3857)
luisa-beerboom Nov 13, 2026
e747973
Bump psycopg in /requirements/partial in the database-dependencies gr…
dependabot[bot] Nov 13, 2026
78ce280
Bump pypdf from 6.21.4 to 7.0.0 in /requirements/partial (#3852)
dependabot[bot] Nov 13, 2026
692fe45
Bump py-spy from 0.4.2 to 0.4.3 in /requirements/partial (#3848)
dependabot[bot] Nov 13, 2026
3753554
Bump the general-dependencies group across 1 directory with 3 updates…
dependabot[bot] Nov 13, 2026
59178e2
Update meta repository (#3858)
openslides-automation[bot] Nov 13, 2026
ee61eb0
Fix On Success on Poll Stop (#3849)
hjanott Nov 13, 2026
4987fd4
Merge remote-tracking branch 'upstream/main' into feature/dammi
luisa-beerboom Nov 17, 2026
3bb2fff
Update test_0100_init_reldb.py
luisa-beerboom Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ jobs:

- name: Check pyupgrade
if: always()
run: make pyupgrade
run: |
make pyupgrade
test $(git status --porcelain | wc -l) = 0

check-models-all:
name: Check from models.yml up to permissions and jsons
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ openslides_backend/htmlcov
openslides_backend/migrations/previous_models/
migrations/*.json
migrations/*.sql
openslides_backend/migrations/previous_models

# secrets
secrets/
2 changes: 1 addition & 1 deletion cli/generate_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def get_code(self, field_name: str) -> str:
if self.to:
properties += self.to.get_properties()
if self.on_delete:
assert self.on_delete in [mode for mode in OnDelete]
assert self.on_delete in OnDelete
properties += f"on_delete=fields.OnDelete.{self.on_delete}, "
if self.is_view_field:
properties += "is_view_field=True, "
Expand Down
4 changes: 2 additions & 2 deletions docs/actions/committee.json_upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Besides the usual headers as seen in the payload (`name`, `type`, `is_list`), th
- `done`: The meeting was found in the datastore, the new meeting will be cloned from it.
- `warning`: The meeting was not found and the new meeting will not be cloned, but freshly created.
- `meeting_time_zone`:
- `done`: Valid timezone string (see [presenter](../presenters/get_valid_timezones.md)).
- `done`: Valid IANA timezone string.
- `warning`: Field empty and there's a start/end_time.
- `error`: Not a valid timezone string.
- `error`: Not a valid IANA timezone string.

The fields `forward_to_committee`, `organization_tags`, `managers`, `meeting_admins` and `meeting_template` store the `id` of the related model, if it exists, in the object for the import.

Expand Down
2 changes: 1 addition & 1 deletion docs/actions/meeting.create.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Creates a meeting.

Checks whether the `organization.limit_of_meetings` is unlimited (=0) or lower than the amount of active meetings in `organization.active_meeting_ids`.

`time_zone` must be a valid timezone string (see [presenter](../presenters/get_valid_timezones.md)).
`time_zone` must be a valid IANA timezone string.

The following objects are created, too:
- Groups: `Default`, `Admin`, `Delegates`, `Staff`, `Committees`. The first one is set as `meeting/default_group_id`, the second one as `meeting/admin_group_id`. The permissions can be found in the [initial-data.json](https://github.com/OpenSlides/openslides-backend/tree/main/data/initial-data.json)).
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/meeting.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Updates the meeting.
If `set_as_template` is `True`, `template_for_organization_id` has to be set to `1`. If it is `False`, `template_for_organization_id` has to be set to `None` and if there are currently no users in the meetings admin group, an exception needs to be raised.
`reference_projector_id` can only be set to a projector, which is not internal.

`time_zone` must be a valid timezone string (see [presenter](../presenters/get_valid_timezones.md)).
`time_zone` must be a valid IANA timezone string.

This action doesn't allow for a meeting to be set as a template and have `locked_from_inside` set to true at the same time. if this would be the result of an action call, an exception will be thrown. Same for `enable_anonymous` and `locked_from_inside` being true at the same time.

Expand Down
2 changes: 1 addition & 1 deletion docs/actions/organization.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
## Action
Updates the organization.
Checks if the theme_id is one of the theme_ids.
`time_zone` must be a valid timezone string (see [presenter](../presenters/get_valid_timezones.md)).
`time_zone` must be a valid IANA timezone string.

This is an example of the saml_attr_mapping, where you can see the mappable fields.
```json
Expand Down
2 changes: 2 additions & 0 deletions docs/actions/participant.json_upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ The field `is_present` is a boolean in the payload. When importing this data, th
Structure levels will be created during the later import phase if they aren't found.
For this purpose the statistics row includes an extra point 'structure levels created'

This action supports change detection (See [here](preface_special_imports.md#change-detection))

### User matching
Same as in [account.json_upload#user-matching](account.json_upload.md#user-matching)

Expand Down
108 changes: 106 additions & 2 deletions docs/actions/preface_special_imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ This type will be used, if we need to give more information than just a value (o
value: boolean | number | integer | string | date;
info: ImportState;
id: number; // optional
changed: bool; // optional and only used in imports that support it
}
```

Expand Down Expand Up @@ -129,8 +130,11 @@ The internal types will be created by the backend service from the CSV-strings
rows: [ //details and example see above
{
state: string, // row state, one of done, new, error
messages: [string],
messages: string[],
data: json,
list_delete_amounts: {
[string]: int
}
}
]
}
Expand All @@ -150,8 +154,108 @@ The internal types will be created by the backend service from the CSV-strings
// property name and type must match an entry in the given `headers`
[property: string]: (boolean | number | string | date | object) []; // if is_list is set in corresponding header column, we need here also a list. `object` only on error
};
list_delete_amounts: { [string]: int } // optional and only used in imports that support change detection. See more in section 'Change Detection'.
}[]; // row-list: Empty list, if `import` in payload was `false` to delete the import_preview-record on database
}[[]]; // nested lists for actions and data row per action
}

``
```

## Change Detection
### The `changed` and `list_delete_amounts` keywords
These keywords are used in the preview to signify the relation between the cell content and the related database data at the time of upload.

Any single field that contains a value that would change database data (i.e. by filling in a new field, changing a value or creating a new model) will be marked with `"changed": True`.

For list columns, every new element is marked with `"changed": True`. Any removed values are counted and then added to the `list_delete_amounts`-dict with the import field name as keyword.

These keywords are only written for update or reference rows in imports that support change detection, and if `changed` isn't written there it is assumed to be `False`.

In such imports all columns should be object columns.

### Example of one result element:
```js
{
headers: [
{
property: "name",
type: "string",
is_object: true,
},
{
property: "number",
type: "integer",
is_object: true,
},
{
property: "admin",
type: "string",
is_object: true,
is_list: true,
}
],
rows: [
{
state: "done",
messages: [],
data: {
id: 3,
name: {
value: "test",
info: "done",
id: 3
},
number: {
value: 123456,
info: "done",
changed: true
},
admin: [
{
value: "fritz",
info: "done",
id: 234
},
{
value: "kalle",
info: "new",
changed: true
},
]
},
list_delete_amounts: { admin: 2 }
},
{
state: "new",
messages: [],
data: {
name: {
value: "test2",
info: "new",
},
number: {
value: 1234567,
info: "done",
},
admin: [
{
value: "fritz",
info: "done",
id: 234
},
{
value: "kalle2electric_boogaloo",
info: "new",
},
]
}
},
],
statistics: [
{name: "itemCount", value: 8},
{name: "bla foo", value: 3},
{name: "blub", value: 5}
]
}
```

10 changes: 2 additions & 8 deletions docs/actions/user.create.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
member_number: string;
default_vote_weight: decimal(6);
external: boolean;
default_password: string;

// Group B
number: string;
Expand All @@ -40,9 +41,6 @@
// Group E
organization_management_level: string;

// Group F
default_password: string;

// Group G
is_demo_user: boolean;

Expand Down Expand Up @@ -95,7 +93,7 @@ The request user needs the basic permissions, see [Permissions for altering a us

Group A:

No special permissions
Aside from the above, the request user needs at minimum the OML-Level of the requested user.

Group B:

Expand All @@ -119,10 +117,6 @@ Group E:

The request user needs the OML equal or higher than that he wants to set. So the minimum is `can_manage_users`.

Group F:

The request user needs the permissions under the rules of user_scope, see [Permissions for altering a user](https://github.com/OpenSlides/OpenSlides/wiki/Users#Permissions-for-altering-a-user), but at minimum the OML-Level of the requested user.

Group G:

The request user needs the OML superadmin.
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/user.save_saml_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Extras to do on creation:
- A default value can be given in case the payloads attribute does not exist or contains no data. (Logged as debug)
- Groups and structure levels are given as a list of attribute-default pairs.
- On conflict of multiple mappers mappings on a same meetings field the last given mappers data for that field is used. Exception to this are groups and structure levels. Their data is combined.
- Values for groups and structure levels can additionally be given in comma separated lists composed as a single string.
- Values for groups and structure levels can be specified either as a list of strings or as a single comma-separated string.
- Values for groups are interpreted as their external ID and structure levels as their name within that meeting.
- If no group exists for a meeting and no default is given, the meetings default group is used. (Logged as warning)
- If a structure level does not exist, it is created.
Expand Down
10 changes: 2 additions & 8 deletions docs/actions/user.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
pronoun: string;
email: string;
default_vote_weight: decimal(6);
default_password: string;

// Group B
number: string;
Expand All @@ -41,9 +42,6 @@
// Group E
organization_management_level: string;

// Group F
default_password: string;

// Group G
is_demo_user: boolean;

Expand Down Expand Up @@ -96,7 +94,7 @@ If the user to be updated has a `saml_id`, the fields `can_change_own_password`

Group A:

See [Permissions for altering a user](https://github.com/OpenSlides/OpenSlides/wiki/Users#Permissions-for-altering-a-user).
The request user needs the permissions under the rules of user_scope, see [Permissions for altering a user](https://github.com/OpenSlides/OpenSlides/wiki/Users#Permissions-for-altering-a-user), but at minimum the OML of the requested user.

Group B:

Expand All @@ -120,10 +118,6 @@ Group E:

The request user needs the OML equal or higher than that he wants to set. So the minimum is `can_manage_users`.

Group F:

The request user needs the permissions under the rules of user_scope, see [Permissions for altering a user](https://github.com/OpenSlides/OpenSlides/wiki/Users#Permissions-for-altering-a-user), but at minimum the OML of the requested user.

Group G:

The request user needs the OML `superadmin`.
Expand Down
3 changes: 2 additions & 1 deletion docs/presenters/get_user_scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
user_oml: String, // one of "superadmin", "can_manage_organization", "can_manage_users", ""
committee_ids: Id[], // Ids of all committees the user is part of
user_in_archived_meetings_only: boolean, // True if total number of meeting_ids for user is more than 0 and number of active meetings is 0
home_committee_id: Id | None // The id of the user's home committee, None if he doesn't have one
home_committee_id: Id | None, // The id of the user's home committee, None if he doesn't have one
is_committee_manager: boolean // Whether the user has any committee management rights at all
},
...
}
Expand Down
27 changes: 0 additions & 27 deletions docs/presenters/get_valid_timezones.md

This file was deleted.

16 changes: 14 additions & 2 deletions openslides_backend/action/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
transform_to_fqids,
)
from ..shared.typing import DeletedModel, HistoryInformation
from ..shared.util import json_schema_error_to_str
from .relations.relation_manager import RelationManager, RelationUpdates
from .relations.typing import FieldUpdateElement, ListUpdateElement
from .util.action_type import ActionType
Expand Down Expand Up @@ -330,7 +331,9 @@ def validate_instance(self, instance: dict[str, Any]) -> None:
}
)
except fastjsonschema.JsonSchemaException as exception:
raise ActionException(f"Action {self.name}: " + exception.message)
raise ActionException(
f"Action {self.name}: " + json_schema_error_to_str(exception)
)

def base_update_instance(self, instance: dict[str, Any]) -> dict[str, Any]:
"""
Expand Down Expand Up @@ -745,7 +748,16 @@ def execute_other_action(
def get_on_success(self, action_data: ActionData) -> Callable[[], None] | None:
"""
Can be overridden by actions to return a cleanup method to execute
after the result was successfully written to the DS.
after the result was successfully written to the DB and the connection was closed.
"""
return None

def get_on_success_transaction_based(
self, action_data: ActionData
) -> Callable[[], None] | None:
"""
Can be overridden by actions to return a cleanup method to execute
after the result was successfully written to the DB.
"""
return None

Expand Down
Loading
Loading