From 9b98881a5b5d0323585c31652464ea7c0e9c9902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Such=C3=A1nek?= Date: Mon, 16 Sep 2024 13:10:58 +0200 Subject: [PATCH] fix(docworker): Fix inconsistencies in document context --- packages/dsw-document-worker/CHANGELOG.md | 4 ++++ .../dsw/document_worker/model/context.py | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/dsw-document-worker/CHANGELOG.md b/packages/dsw-document-worker/CHANGELOG.md index b5874047..f071d28b 100644 --- a/packages/dsw-document-worker/CHANGELOG.md +++ b/packages/dsw-document-worker/CHANGELOG.md @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed + +- Fixed inconsistencies in document context with metamodel version 14 + ## [4.10.5] diff --git a/packages/dsw-document-worker/dsw/document_worker/model/context.py b/packages/dsw-document-worker/dsw/document_worker/model/context.py index 8d769096..43c46159 100644 --- a/packages/dsw-document-worker/dsw/document_worker/model/context.py +++ b/packages/dsw-document-worker/dsw/document_worker/model/context.py @@ -123,7 +123,7 @@ def __init__(self, uuid, name, logo, integration_id, item_url, props, self.id = integration_id # type: str self.item_url = item_url # type: Optional[str] self.logo = logo # type: Optional[str] - self.props = props # type: dict[str, str] + self.props = props # type: list[str] self.type = integration_type # type: str self.annotations = annotations # type: AnnotationsT @@ -173,7 +173,7 @@ def default(): logo='', integration_id='', item_url='', - props={}, + props=[], rq_body='', rq_method='GET', rq_url='', @@ -1588,7 +1588,7 @@ def __init__(self, uuid, first_name, last_name, gravatar_hash, image_url, membership_type): self.uuid = uuid # type: str self.first_name = first_name # type: str - self.lastName = last_name # type: str + self.last_name = last_name # type: str self.gravatar_hash = gravatar_hash # type: str self.image_url = image_url # type: Optional[str] self.membership_type = membership_type # type: str @@ -1662,8 +1662,8 @@ def is_owner(self): @staticmethod def load(data: dict, **options): - return DocumentContextUserPermission( - user=UserGroup.load(data['group'], **options), + return DocumentContextUserGroupPermission( + group=UserGroup.load(data['group'], **options), permissions=data['perms'], )