Skip to content

Commit

Permalink
fix: Some more fixes for #833 (#1014)
Browse files Browse the repository at this point in the history
This fixes more issues with #833 and also with #994...
  • Loading branch information
phorward authored Jan 9, 2024
1 parent 891fc21 commit 16f5a88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/viur/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def __getitem__(self, key: str) -> Any:
new_path = f"{self._path}{self._resolve_mapping(key)}"
warnings.warn(f"conf uses now attributes! "
f"Use conf.{new_path} to access your option",
DeprecationWarning)
DeprecationWarning,
stacklevel=2)

if self.strict_mode:
raise SyntaxError(
Expand Down Expand Up @@ -596,7 +597,7 @@ class Conf(ConfigType):

compatibility: Multiple[str] = [
"json.bone.structure.camelcasenames", # use camelCase attribute names (see #637 for details)
"bone.structure.keytuples", # use classic structure notation: `"structure = [["key", {...}] ...]` (#649)
"json.bone.structure.keytuples", # use classic structure notation: `"structure = [["key", {...}] ...]` (#649)
"json.bone.structure.inlists", # dump skeleton structure with every JSON list response (#774 for details)
]
"""Backward compatibility flags; Remove to enforce new layout."""
Expand Down
4 changes: 3 additions & 1 deletion src/viur/core/scripts/migrate_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
mapping = {
"admin.color.primary": "admin.color.primary",
"admin.color.secondary": "admin.color.secondary",
"admin.scriptor": "admin.scriptor",
"admin.login.background": "admin.login.background",
"admin.login.logo": "admin.login.logo",
"admin.logo": "admin.logo",
"admin.moduleGroups": "admin.module_groups",
"admin.name": "admin.name",
"viur.accessRights": "user.access_rights",
"viur.availableLanguages": "i18n.available_languages",
Expand Down Expand Up @@ -58,7 +60,7 @@
"viur.otp.issuer": "user.otp_issuer",
"viur.render.html.downloadUrlExpiration": "render_html_download_url_expiration",
"viur.render.json.downloadUrlExpiration": "render_json_download_url_expiration",
"viur.request_preprocessor": "request_preprocessor",
"viur.requestPreprocessor": "request_preprocessor",
"viur.script.admin_info": "script_admin_info",
"viur.search_valid_chars": "search_valid_chars",
"viur.security.captcha.defaultCredentials": "security.captcha.defaultCredentials",
Expand Down

0 comments on commit 16f5a88

Please sign in to comment.