Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modelbaker/dataobjects/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Project(QObject):

def __init__(
self,
auto_transaction: bool = True,
auto_transaction: str = "True", # TODO: Change default value when dropping QGIS <3.26 support
evaluate_default_values: bool = True,
context: dict[str, str] = {},
optimize_strategy: OptimizeStrategy = OptimizeStrategy.NONE,
Expand Down Expand Up @@ -127,13 +127,13 @@ def create(
) -> None:
if Qgis.QGIS_VERSION_INT < 32600:
# set auto_transaction as boolean
qgis_project.setAutoTransaction(self.auto_transaction)
qgis_project.setAutoTransaction(self.auto_transaction == "True")
else:
# set auto_transaction mode
mode = Qgis.TransactionMode.Disabled
if (
self.auto_transaction == Qgis.TransactionMode.AutomaticGroups.name
or self.auto_transaction is True
or self.auto_transaction == "True" # Legacy
):
mode = Qgis.TransactionMode.AutomaticGroups
elif self.auto_transaction == Qgis.TransactionMode.BufferedGroups.name:
Expand Down