Skip to content
Permalink
Browse files

Fix calculation with null strings

  • Loading branch information
nyalldawson committed Sep 6, 2017
1 parent 3086619 commit 30c663eaef5b0a043df658e52a5d9fd3f68a15b2
Showing with 5 additions and 2 deletions.
  1. +5 −2 python/plugins/processing/algs/qgis/StatisticsByCategories.py
@@ -158,10 +158,13 @@ def addField(name):
continue
else:
value = float(attrs[value_field_index])
elif field_type == 'string':
if attrs[value_field_index] == NULL:
value=''
else:
value = str(attrs[value_field_index])
elif attrs[value_field_index] == NULL:
value = NULL
elif field_type == 'string':
value = str(attrs[value_field_index])
else:
value = attrs[value_field_index]
cat = tuple([attrs[c] for c in category_field_indexes])

0 comments on commit 30c663e

Please sign in to comment.
You can’t perform that action at this time.