fix: modified value without layer

This commit is contained in:
egarette@silique.fr 2026-01-13 10:12:31 +01:00
parent 80eadf773d
commit f3d215aa42
7 changed files with 14 additions and 8 deletions

View file

@ -278,7 +278,12 @@ class Node:
is_default = option.owner.isdefault()
option_path = option.path()
default_owner = owners.default
true_default = is_default and meta_option.owner.get() == default_owner
if self.root_config == meta_config:
added = True
true_default = is_default
else:
true_default = is_default and meta_option.owner.get() == default_owner
added = not is_default or true_default
while True:
if values and true_default and value in [None, []]:
break
@ -290,7 +295,7 @@ class Node:
loaded_from = None
else:
loaded_from = meta_option.information.get(loaded_from_key, None)
if true_default or loaded_from or force_store_value:
if added or force_store_value:
values.append(
{
"value": value,
@ -325,6 +330,7 @@ class Node:
except Exception as err:
break
true_default = is_default and meta_option.owner.get() == default_owner
added = True
meta_config = new_meta_config
if leader_index is not None:
if len(value) > leader_index:

View file

@ -1,4 +1,4 @@
> [!CAUTION]
>
> - family1
> - this variable is in fact a family: :stop_sign: [- is a family so we cannot set the value "value", it has been loading from fake user data -]
> - this variable is in fact a family: :stop_sign: [- it's a family so we cannot set the value "value", it has been loading from fake user data -]

View file

@ -1,4 +1,4 @@
> [!CAUTION]
>
> - family1
> - this variable is in fact a family: :stop_sign: <span style="color: #C23636">is a family so we cannot set the value "value", it has been loading from fake user data</span>
> - this variable is in fact a family: :stop_sign: <span style="color: #C23636">it's a family so we cannot set the value "value", it has been loading from fake user data</span>

View file

@ -1,3 +1,3 @@
🛑 Caution
┗━━ family1
 ┗━━ this variable is in fact a family: 🛑 is a family so we cannot set the value "value", it has been loading from fake user data
 ┗━━ this variable is in fact a family: 🛑 it's a family so we cannot set the value "value", it has been loading from fake user data

View file

@ -1,6 +1,6 @@
> [!CAUTION]
>
> - family1
> - this variable is in fact a family: :bell: [- is a family so we cannot set the value "value", it will be ignored when loading from fake user data -]
> - this variable is in fact a family: :bell: [- it's a family so we cannot set the value "value", it will be ignored when loading from fake user data -]
> - this variable is in fact a family
> - a true variable: :stop_sign: [- mandatory variable but has no value -]

View file

@ -1,6 +1,6 @@
> [!CAUTION]
>
> - family1
> - this variable is in fact a family: :bell: <span style="color: #EFBF04">is a family so we cannot set the value "value", it will be ignored when loading from fake user data</span>
> - this variable is in fact a family: :bell: <span style="color: #EFBF04">it's a family so we cannot set the value "value", it will be ignored when loading from fake user data</span>
> - this variable is in fact a family
> - a true variable: :stop_sign: <span style="color: #C23636">mandatory variable but has no value</span>

View file

@ -1,5 +1,5 @@
🛑 Caution
┗━━ family1
 ┣━━ this variable is in fact a family: 🔔 is a family so we cannot set the value "value", it will be ignored when loading from fake user data
 ┣━━ this variable is in fact a family: 🔔 it's a family so we cannot set the value "value", it will be ignored when loading from fake user data
 ┗━━ this variable is in fact a family
  ┗━━ a true variable: 🛑 mandatory variable but has no value