mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
warn if 'settings_category' is not filled but settings are received
This commit is contained in:
parent
32ea97af45
commit
2e345fb297
1 changed files with 12 additions and 2 deletions
|
|
@ -354,12 +354,17 @@ def get_plugin_settings(plugin, project_settings, log, category=None):
|
|||
# Use project settings based on a category name
|
||||
if category:
|
||||
try:
|
||||
return (
|
||||
output = (
|
||||
project_settings
|
||||
[category]
|
||||
["publish"]
|
||||
[plugin.__name__]
|
||||
)
|
||||
warnings.warn(
|
||||
f"Please fill 'settings_category' for plugin '{plugin.__name__}'.",
|
||||
DeprecationWarning
|
||||
)
|
||||
return output
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
|
|
@ -384,12 +389,17 @@ def get_plugin_settings(plugin, project_settings, log, category=None):
|
|||
category_from_file = "core"
|
||||
|
||||
try:
|
||||
return (
|
||||
output = (
|
||||
project_settings
|
||||
[category_from_file]
|
||||
[plugin_kind]
|
||||
[plugin.__name__]
|
||||
)
|
||||
warnings.warn(
|
||||
f"Please fill 'settings_category' for plugin '{plugin.__name__}'.",
|
||||
DeprecationWarning
|
||||
)
|
||||
return output
|
||||
except KeyError:
|
||||
pass
|
||||
return {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue