Timothy J. Baek 1 éve
szülő
commit
989a4d3165
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      backend/apps/images/main.py

+ 2 - 2
backend/apps/images/main.py

@@ -402,7 +402,7 @@ def generate_image(
             for image in res["data"]:
                 image_filename = save_b64_image(image["b64_json"])
                 images.append({"url": f"/cache/image/generations/{image_filename}"})
-                file_body_path = IMAGE_CACHE_DIR.joinpath(f"{image_id}.json")
+                file_body_path = IMAGE_CACHE_DIR.joinpath(f"{image_filename}.json")
 
                 with open(file_body_path, "w") as f:
                     json.dump(data, f)
@@ -477,7 +477,7 @@ def generate_image(
             for image in res["images"]:
                 image_filename = save_b64_image(image)
                 images.append({"url": f"/cache/image/generations/{image_filename}"})
-                file_body_path = IMAGE_CACHE_DIR.joinpath(f"{image_id}.json")
+                file_body_path = IMAGE_CACHE_DIR.joinpath(f"{image_filename}.json")
 
                 with open(file_body_path, "w") as f:
                     json.dump({**data, "info": res["info"]}, f)