File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 31
31
import functools
32
32
33
33
from qgis .PyQt .QtCore import QVariant
34
- from qgis .core import QgsApplication , QgsFeatureRequest
34
+ from qgis .core import QgsApplication , QgsFeatureRequest , NULL
35
35
import unittest
36
36
37
37
# Get a backup, we will patch this one later
@@ -170,8 +170,10 @@ def sort_by_pk_or_fid(f):
170
170
171
171
# Round field (only numeric so it works with __all__)
172
172
if 'precision' in cmp and field_expected .type () in [QVariant .Int , QVariant .Double , QVariant .LongLong ]:
173
- attr_expected = round (attr_expected , cmp ['precision' ])
174
- attr_result = round (attr_result , cmp ['precision' ])
173
+ if not attr_expected == NULL :
174
+ attr_expected = round (attr_expected , cmp ['precision' ])
175
+ if not attr_result == NULL :
176
+ attr_result = round (attr_result , cmp ['precision' ])
175
177
176
178
if use_asserts :
177
179
_TestCase .assertEqual (
You can’t perform that action at this time.
0 commit comments