Skip to content

Commit

Permalink
use enumvalues for static string values
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Dec 1, 2023
1 parent 1c9f0c3 commit 76e53fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modelbaker/dataobjects/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ def create(
# set auto_transaction mode
mode = Qgis.TransactionMode.Disabled
if (
self.auto_transaction == "AutomaticGroups"
or self.auto_transaction == True
): # backwards compatibility
self.auto_transaction == Qgis.TransactionMode.AutomaticGroups.name
or self.auto_transaction is True
):
mode = Qgis.TransactionMode.AutomaticGroups
elif self.auto_transaction == "BufferedGroups":
elif self.auto_transaction == Qgis.TransactionMode.BufferedGroups.name:
mode = Qgis.TransactionMode.BufferedGroups
qgis_project.setTransactionMode(mode)

Expand Down

0 comments on commit 76e53fd

Please sign in to comment.