diff --git a/packit_service/models.py b/packit_service/models.py index 4058f305b..d22c276b9 100644 --- a/packit_service/models.py +++ b/packit_service/models.py @@ -23,7 +23,6 @@ from cachetools import TTLCache, cached from cachetools.func import ttl_cache -from packit.config import JobConfigTriggerType from sqlalchemy import ( JSON, Boolean, @@ -55,6 +54,7 @@ from sqlalchemy.sql.functions import count from sqlalchemy.types import ARRAY +from packit.config import JobConfigTriggerType from packit_service.constants import ALLOWLIST_CONSTANTS logger = logging.getLogger(__name__) @@ -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