From 5d6bc631dffdb3dfb8bff67f61dae80ddc5b908d Mon Sep 17 00:00:00 2001 From: Maja Massarini Date: Tue, 12 Nov 2024 12:06:51 +0100 Subject: [PATCH] Do not explicitly begin() a transaction. The previous code was raising an InvalidRequestError. --- packit_service/models.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/packit_service/models.py b/packit_service/models.py index 4058f305b..ed43eaf8e 100644 --- a/packit_service/models.py +++ b/packit_service/models.py @@ -2342,8 +2342,6 @@ def add_scan_transaction(self) -> Generator["OSHScanModel"]: raise: IntegrityError if the scan model already exists """ session = singleton_session or Session() - session.begin() - try: scan = OSHScanModel() scan.copr_build_target = self