Adjust for YAML config booleans being actual booleans
authorKarl O. Pinc <kop@karlpinc.com>
Sat, 22 Jun 2024 03:05:14 +0000 (22:05 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Sat, 22 Jun 2024 03:05:14 +0000 (22:05 -0500)
src/pgwui_core/core.py

index 64d84c282c00fd2845b94ec09d04473de20f9c92..e04ef2583143fd2184f2c23b0c6929e3c9bb7b5c 100644 (file)
@@ -34,7 +34,6 @@ More general description of the module.
 
 from csv import reader as csv_reader
 import collections.abc
-import ast
 import attrs
 import markupsafe
 import hashlib
@@ -1847,8 +1846,7 @@ class UnsafeUploadEngine(DBConnector):
         if errors:
             conn.rollback()
         else:
-            if ast.literal_eval(
-                    self.uh.request.registry.settings['pgwui']['dry_run']):
+            if self.uh.request.registry.settings['pgwui']['dry_run']:
                 conn.rollback()
                 errors.append(self.dryrunerror_factory())
             else: