From 6eae570b6c99c2c4c674ef380e77b0c97dc1074c Mon Sep 17 00:00:00 2001 From: Martijn Vermaat <martijn@vermaat.name> Date: Thu, 1 Oct 2015 17:01:03 +0200 Subject: [PATCH] Fix query bug in update transcript-protein links --- mutalyzer/db/queries.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mutalyzer/db/queries.py b/mutalyzer/db/queries.py index d457b60c..230804d7 100644 --- a/mutalyzer/db/queries.py +++ b/mutalyzer/db/queries.py @@ -115,8 +115,7 @@ def update_transcript_protein_link(transcript_accession=None, protein_accession) # Delete any related existing links. - links = TranscriptProteinLink.query.filter(or_(*clauses)) - session.delete(links) + TranscriptProteinLink.query.filter(or_(*clauses)).delete() session.commit() # There is a race condition here between deleting old links and adding the -- GitLab