Skip to content

Commit

Permalink
fix extra networks metadata failing to work properly when you create …
Browse files Browse the repository at this point in the history
…the .json file with metadata for the first time.
  • Loading branch information
AUTOMATIC1111 committed Feb 2, 2024
1 parent 1ff1c5b commit 321b2db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/ui_extra_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def get_single_card(page: str = "", tabname: str = "", name: str = ""):
errors.display(e, "creating item for extra network")
item = page.items.get(name)

page.read_user_metadata(item)
page.read_user_metadata(item, use_cache=False)
item_html = page.create_item_html(tabname, item, shared.html("extra-networks-card.html"))

return JSONResponse({"html": item_html})
Expand Down Expand Up @@ -173,9 +173,9 @@ def __init__(self, title):
def refresh(self):
pass

def read_user_metadata(self, item):
def read_user_metadata(self, item, use_cache=True):
filename = item.get("filename", None)
metadata = extra_networks.get_user_metadata(filename, lister=self.lister)
metadata = extra_networks.get_user_metadata(filename, lister=self.lister if use_cache else None)

desc = metadata.get("description", None)
if desc is not None:
Expand Down

0 comments on commit 321b2db

Please sign in to comment.