From 54c3854c0d2210786b6e3fb8d7170eae60e7ab44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20T=C3=B3th?= Date: Sun, 23 Jun 2024 12:10:45 +0200 Subject: [PATCH] Fix 'close_transactions' worker input - Fix handling of null or empty input in the 'close_transactions' worker by setting default value to empty list. --- uniconfig/python/CHANGELOG.md | 5 ++++- .../python/frinx_worker/uniconfig/transaction_helpers.py | 3 ++- uniconfig/python/pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/uniconfig/python/CHANGELOG.md b/uniconfig/python/CHANGELOG.md index b1aa5d8..e84892d 100644 --- a/uniconfig/python/CHANGELOG.md +++ b/uniconfig/python/CHANGELOG.md @@ -50,4 +50,7 @@ - Fix Device Discovery RPC based on new OpenAPI model. # 2.3.4 -- Device Discovery RPC workaround caused by choice-nodes in UniConfig Yang models. \ No newline at end of file +- Device Discovery RPC workaround caused by choice-nodes in UniConfig Yang models. + +# 2.3.5 +- Fix handling of null or empty input in the 'close_transactions' worker. diff --git a/uniconfig/python/frinx_worker/uniconfig/transaction_helpers.py b/uniconfig/python/frinx_worker/uniconfig/transaction_helpers.py index be34220..65e8020 100644 --- a/uniconfig/python/frinx_worker/uniconfig/transaction_helpers.py +++ b/uniconfig/python/frinx_worker/uniconfig/transaction_helpers.py @@ -124,7 +124,8 @@ class WorkerDefinition(TaskDefinition): class WorkerInput(TaskInput): uniconfig_transactions: list[UniconfigTransactionContext] = Field( - description="List of UniConfig transactions to be closed by this worker." + description="List of UniConfig transactions to be closed by this worker.", + default=[] ) class WorkerOutput(TaskOutput): diff --git a/uniconfig/python/pyproject.toml b/uniconfig/python/pyproject.toml index 9dac6a5..8a0669b 100644 --- a/uniconfig/python/pyproject.toml +++ b/uniconfig/python/pyproject.toml @@ -21,7 +21,7 @@ packages = [{ include = "frinx_worker" }] name = "frinx-uniconfig-worker" description = "Conductor worker for Frinx Uniconfig" authors = ["Jozef Volak "] -version = "2.3.4" +version = "2.3.5" readme = ["README.md", "CHANGELOG.md", "RELEASE.md"] keywords = ["frinx-machine", "uniconfig", "worker"] license = "Apache 2.0"