Skip to content

Commit

Permalink
fix infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Mole1424 committed Jun 12, 2024
1 parent 6d8cc60 commit 6f2e7c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 6f2e7c5

Please sign in to comment.