From a2de38563860546c21ecc3320806a4b27f287d63 Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Sun, 9 Feb 2025 17:33:26 -0800 Subject: [PATCH] fix style app/photo_routes/proutes.py --- app/photo_routes/proutes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/photo_routes/proutes.py b/app/photo_routes/proutes.py index 6e9430c..0d723d6 100644 --- a/app/photo_routes/proutes.py +++ b/app/photo_routes/proutes.py @@ -33,7 +33,9 @@ def get_photo_list(contributor_id): password=current_app.config['DATABASE_PASSWORD'] ) cur = conn.cursor(cursor_factory=psycopg2.extras.RealDictCursor) - cur.execute("SELECT photo_name,id FROM photo WHERE contributor_id=%s ORDER BY timestamp,\"DateTimeOriginal\" DESC", (contributor_id, )) + my_sql = "SELECT photo_name,id FROM photo WHERE contributor_id=%s " + my_sql += "ORDER BY timestamp,\"DateTimeOriginal\" DESC" + cur.execute(my_sql, (contributor_id, )) photos = cur.fetchall() conn.close() return photos