From 7fd32cbab71f66d5f9258d1dcbd5440e1e8d8017 Mon Sep 17 00:00:00 2001 From: Nora-Olivia-Ammann <103038637+Nora-Olivia-Ammann@users.noreply.github.com> Date: Fri, 15 Nov 2024 17:19:05 +0100 Subject: [PATCH] Update serialise_value.py --- .../models/serialise/serialise_value.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/dsp_tools/commands/xmlupload/models/serialise/serialise_value.py b/src/dsp_tools/commands/xmlupload/models/serialise/serialise_value.py index 6e23e89fa..b18e0e689 100644 --- a/src/dsp_tools/commands/xmlupload/models/serialise/serialise_value.py +++ b/src/dsp_tools/commands/xmlupload/models/serialise/serialise_value.py @@ -166,6 +166,22 @@ def serialise(self) -> dict[str, Any]: return serialised +class SerialiseList(SerialiseValue): + """An ListValue to be serialised.""" + + value: str + + def serialise(self) -> dict[str, Any]: + serialised = { + "@type": "knora-api:ListValue", + "knora-api:listValueAsListNode": { + "@id": self.value, + }, + } + serialised.update(self._get_optionals()) + return serialised + + class SerialiseLink(SerialiseValue): """A LinkValue to be serialised."""