Merge pull request #12424 from AUTOMATIC1111/extra-network-metadata-inherit-old-description

extra network metadata inherit old description
This commit is contained in:
AUTOMATIC1111 2023-08-09 14:41:30 +03:00 committed by GitHub
commit 358f55db6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,8 +36,8 @@ 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
return user_metadata