From 6f2e7c5b8e17577c15acccd9ec1a4b1a84f85a3b Mon Sep 17 00:00:00 2001 From: Mole1424 Date: Wed, 12 Jun 2024 19:09:18 +0000 Subject: [PATCH] fix infinite loop --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 0e956f7..74cf5f6 100644 --- a/app.py +++ b/app.py @@ -21,7 +21,7 @@ from db_schema import Projects, db -dev = False # if true then uses config.txt to set environment variables +dev = True # if true then uses config.txt to set environment variables if dev: with open("config.txt", "r") as f: for line in f.readlines(): @@ -328,7 +328,7 @@ def add_photo( makedirs(path.dirname(file_path)) i = 1 - while path.exists(file_path) or file_name == "bear": + while path.exists(file_path) or (dog and i == 1): file_path = f"{base_path}{i}{ext}" i += 1