File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ def change_strategy(
2323 exclude_plugins : list [str ],
2424 include_plugins : list [str ],
2525 ) -> bool :
26- with session_factory .create_session () as session :
26+ with session_factory .create_session () as session , session . begin () :
2727 exist_strategy = session .scalar (
2828 select (TenantPluginAutoUpgradeStrategy )
2929 .where (TenantPluginAutoUpgradeStrategy .tenant_id == tenant_id )
@@ -50,7 +50,7 @@ def change_strategy(
5050
5151 @staticmethod
5252 def exclude_plugin (tenant_id : str , plugin_id : str ) -> bool :
53- with session_factory .create_session () as session :
53+ with session_factory .create_session () as session , session . begin () :
5454 exist_strategy = session .scalar (
5555 select (TenantPluginAutoUpgradeStrategy )
5656 .where (TenantPluginAutoUpgradeStrategy .tenant_id == tenant_id )
You can’t perform that action at this time.
0 commit comments