From c105d12fcd4b4e88c38f5823e75ee4d3b1abce65 Mon Sep 17 00:00:00 2001 From: BlafKing Date: Wed, 13 Mar 2024 03:14:52 +0100 Subject: [PATCH] Hotfix --- scripts/civitai_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/civitai_api.py b/scripts/civitai_api.py index d43f912..ae2e8a2 100644 --- a/scripts/civitai_api.py +++ b/scripts/civitai_api.py @@ -433,7 +433,7 @@ def update_next_page(content_type, sort_type, period_type, use_search_term, sear if gl.json_data is None: return - if gl.json_data in {"timeout", "error", "offline"}: + if isinstance(gl.json_data, str): hasPrev = current_page not in [0, 1] hasNext = current_page == 1 or hasPrev model_dict = {} @@ -445,7 +445,7 @@ def update_next_page(content_type, sort_type, period_type, use_search_term, sear elif gl.json_data == "error": HTML = api_error_msg("error") - if gl.json_data not in {None, "timeout", "error", "offline"}: + if not isinstance(gl.json_data, str): (hasPrev, hasNext, current_page, total_pages) = pagecontrol(gl.json_data) model_dict = {} try: