Skip to content
Snippets Groups Projects
Commit 63d47459 authored by Sebastian Lobinger's avatar Sebastian Lobinger
Browse files

use copy.deepcopy in sams_app.py def lang to pass tests - fix issue #14

parent e235deff
Branches
Tags
1 merge request!8Resolve "Ändern der Sprache in ExampleApp muss in beiden Sprachen funtkionieren"
This commit is part of merge request !8. Comments created here will be created in the context of that merge request.
...@@ -6,7 +6,7 @@ from .exceptions import ( ...@@ -6,7 +6,7 @@ from .exceptions import (
, FunctionNotExists , FunctionNotExists
) )
from .sams_proxy import SAMSProxy from .sams_proxy import SAMSProxy
import sys import sys, copy
def eprint(*args, **kwargs): def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs) print(*args, file=sys.stderr, **kwargs)
...@@ -37,7 +37,7 @@ class SAMSApp: ...@@ -37,7 +37,7 @@ class SAMSApp:
def lang(self, langCode: str) -> dict: def lang(self, langCode: str) -> dict:
request_lang = self.langDict.get(langCode, {}) request_lang = self.langDict.get(langCode, {})
lang = self.langDict[self.__manifest['default_language']] lang = copy.deepcopy(self.langDict[self.__manifest['default_language']])
lang.update(request_lang) lang.update(request_lang)
return lang return lang
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment