diff options
author | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-08-20 07:13:26 +0000 |
---|---|---|
committer | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-08-20 09:48:23 +0000 |
commit | e0e64bcdf606b0c5f0e543b53f7e63a94ec325de (patch) | |
tree | e766653bfe6142a23cea8874abe5f867c52543e5 /modules/config_states.py | |
parent | 36ecff71aea2c9c9f296ae1e0b5da00a3aea26d3 (diff) | |
download | stable-diffusion-webui-gfx803-e0e64bcdf606b0c5f0e543b53f7e63a94ec325de.tar.gz stable-diffusion-webui-gfx803-e0e64bcdf606b0c5f0e543b53f7e63a94ec325de.tar.bz2 stable-diffusion-webui-gfx803-e0e64bcdf606b0c5f0e543b53f7e63a94ec325de.zip |
assert key created_at exist in config_states
Diffstat (limited to 'modules/config_states.py')
-rw-r--r-- | modules/config_states.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/config_states.py b/modules/config_states.py index 62d40106..331c7b90 100644 --- a/modules/config_states.py +++ b/modules/config_states.py @@ -31,10 +31,11 @@ def list_config_states(): try: with open(path, "r", encoding="utf-8") as f: j = json.load(f) + assert "created_at" in j, '"created_at" does not exist' j["filepath"] = path config_states.append(j) except Exception as e: - print(f'[ERROR]{path}, {e}') + print(f'[ERROR]: Config states {path}, {e}') config_states = sorted(config_states, key=lambda cs: cs["created_at"], reverse=True) |