Skip to content

Commit 11866cc

Browse files
committed
black
1 parent 473dbba commit 11866cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mapswipe_workers/mapswipe_workers/firebase_to_postgres/transfer_results.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,19 +297,19 @@ def save_results_to_postgres(results_file, project_id, filter_mode: bool):
297297
if filter_mode:
298298
logger.warn(f"trying to remove invalid tasks from {project_id}.")
299299

300-
filter_query = f"""
300+
filter_query = """
301301
DELETE FROM results_temp
302302
where task_id in (
303303
select task_id from results_temp where task_id not in (
304304
select r.task_id from results_temp r join (
305-
select * from tasks where project_id = '{project_id}'
305+
select * from tasks where project_id = %(project_id)s
306306
) as t
307307
on r.group_id = t.group_id
308308
and r.task_id = t.task_id
309309
)
310310
)
311311
"""
312-
p_con.query(filter_query)
312+
p_con.query(filter_query, {"project_id": project_id})
313313

314314
query_insert_results = """
315315
INSERT INTO results

0 commit comments

Comments
 (0)