From 48f9873548c7c11f57d38475dfe43b72447ce679 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Wed, 20 May 2020 10:02:30 -0400 Subject: [PATCH] Adding yet another flush, because Travis builds keep failing due to database race condition issues in this method. --- crc/services/file_service.py | 1 + 1 file changed, 1 insertion(+) diff --git a/crc/services/file_service.py b/crc/services/file_service.py index e361c332..2ac92bdb 100644 --- a/crc/services/file_service.py +++ b/crc/services/file_service.py @@ -110,6 +110,7 @@ class FileService(object): @staticmethod def update_file(file_model, binary_data, content_type): + session.flush() # Assure the database is up-to-date before running this. file_data_model = session.query(FileDataModel). \ filter_by(file_model_id=file_model.id,