change "profiles" key to "plugin_state_profiles"

This commit is contained in:
Jakub Trllo 2024-05-20 14:53:29 +02:00
parent bb05691289
commit 9dcfd06ed6
2 changed files with 10 additions and 4 deletions

View file

@ -45,9 +45,15 @@ class ValidateContainers(
return
# Disable if no profile is found for the current host
profiles = (
settings
["core"]
["publish"]
["ValidateContainers"]
["plugin_state_profiles"]
)
profile = filter_profiles(
settings["core"]["publish"]["ValidateContainers"]["profiles"],
{"host_names": get_current_host_name()}
profiles, {"host_names": get_current_host_name()}
)
if not profile:
cls.enabled = False

View file

@ -80,7 +80,7 @@ class ValidateContainersModel(BaseSettingsModel):
"""
_isGroup = True
profiles: list[ValidateContainersProfile] = SettingsField(
plugin_state_profiles: list[ValidateContainersProfile] = SettingsField(
default_factory=list
)
@ -886,7 +886,7 @@ DEFAULT_PUBLISH_VALUES = {
"active": True
},
"ValidateContainers": {
"profiles": [
"plugin_state_profiles": [
{
# Default host names are based on original
# filter of ValidateContainer pyblish plugin