Skip to content

Commit

Permalink
[processing] correctly set default value for string parameters when n…
Browse files Browse the repository at this point in the history
…o value is provided
  • Loading branch information
volaya committed Oct 18, 2016
1 parent 194004b commit d7bd5dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/core/parameters.py
Expand Up @@ -740,7 +740,7 @@ class ParameterString(Parameter):
NEWLINE = '\n'
ESCAPED_NEWLINE = '\\n'

def __init__(self, name='', description='', default=None, multiline=False,
def __init__(self, name='', description='', default='', multiline=False,
optional=False, evaluateExpressions=False):
Parameter.__init__(self, name, description, default, optional)
self.multiline = parseBool(multiline)
Expand All @@ -750,7 +750,7 @@ def setValue(self, obj):
if not bool(obj):
if not self.optional:
return False
self.value = None
self.value = self.default
return True

self.value = unicode(obj).replace(
Expand Down

0 comments on commit d7bd5dc

Please sign in to comment.