Skip to content

Commit

Permalink
Merge pull request #1564 from anitagraser/patch-2
Browse files Browse the repository at this point in the history
[processing] check if value is None before trying to cast float
  • Loading branch information
alexbruy committed Aug 28, 2014
2 parents 6130505 + 75b3464 commit 99ff44c
Showing 1 changed file with 9 additions and 8 deletions.
Expand Up @@ -104,16 +104,17 @@ def processAlgorithm(self, progress):
total = 100.0 / float(count)
current = 0
for ft in features:
value = float(ft.attributes()[index])
if isFirst:
minValue = value
maxValue = value
isFirst = False
else:
if value < minValue:
if ft.attributes()[index]:
value = float(ft.attributes()[index])
if isFirst:
minValue = value
if value > maxValue:
maxValue = value
isFirst = False
else:
if value < minValue:
minValue = value
if value > maxValue:
maxValue = value

values.append(value)
sumValue += value
Expand Down

0 comments on commit 99ff44c

Please sign in to comment.