From 1fc65845cc69558807a6ab739ee9a222b14087cc Mon Sep 17 00:00:00 2001 From: vermeul <swen@ethz.ch> Date: Wed, 6 Oct 2021 15:33:34 +0200 Subject: [PATCH] use deepcopy to return dict --- pybis/src/python/pybis/definitions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pybis/src/python/pybis/definitions.py b/pybis/src/python/pybis/definitions.py index 0cd08014e58..3136f86e3af 100644 --- a/pybis/src/python/pybis/definitions.py +++ b/pybis/src/python/pybis/definitions.py @@ -1,3 +1,6 @@ +import copy + + def openbis_definitions(entity): """ attrs_new: Attributes, that can appear when creating new entities @@ -454,7 +457,7 @@ fetch_option = { def get_fetchoption_for_entity(entity): entity = entity[0].lower() + entity[1:] # make first character lowercase try: - return fetch_option[entity] + return copy.deepcopy(fetch_option[entity]) except KeyError as e: return {} -- GitLab