From c1027806936f4460cd01dcdcc93f11ea30390382 Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Wed, 9 Aug 2023 13:38:53 +0900 Subject: [PATCH 1/2] extra network metadata inherit old description --- modules/ui_extra_networks_user_metadata.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ui_extra_networks_user_metadata.py b/modules/ui_extra_networks_user_metadata.py index 1cb9eb6fe..ea7e1ab20 100644 --- a/modules/ui_extra_networks_user_metadata.py +++ b/modules/ui_extra_networks_user_metadata.py @@ -40,6 +40,8 @@ class UserMetadataEditor: user_metadata = {} item['user_metadata'] = user_metadata + if len(user_metadata) == 0: + user_metadata = {'description': item.get('description', '')} return user_metadata def create_extra_default_items_in_left_column(self): From 0cac6ab6153dc376b55c9b7f61c01024515ae73a Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Wed, 9 Aug 2023 20:32:36 +0900 Subject: [PATCH 2/2] extra network metadata inherit old description --- modules/ui_extra_networks_user_metadata.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/ui_extra_networks_user_metadata.py b/modules/ui_extra_networks_user_metadata.py index ea7e1ab20..a5423fd85 100644 --- a/modules/ui_extra_networks_user_metadata.py +++ b/modules/ui_extra_networks_user_metadata.py @@ -36,12 +36,10 @@ class UserMetadataEditor: item = self.page.items.get(name, {}) user_metadata = item.get('user_metadata', None) - if user_metadata is None: - user_metadata = {} + if not user_metadata: + user_metadata = {'description': item.get('description', '')} item['user_metadata'] = user_metadata - if len(user_metadata) == 0: - user_metadata = {'description': item.get('description', '')} return user_metadata def create_extra_default_items_in_left_column(self):