Commit 2af87afc authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Recover default fallback for Int/DateArguments

parent b7ff6e0c
......@@ -223,7 +223,8 @@ class IntArgument(ValueArgument):
def value(self, newvalue):
self._value = int(newvalue)
self._value = self.default if (
newvalue == self.default) else int(newvalue)
except ValueError:
'IntArgument Error',
......@@ -252,7 +253,7 @@ class DateArgument(ValueArgument):
def value(self, newvalue):
self._value = self.format_date(newvalue)
self._value = self.format_date(newvalue) if newvalue else self.default
def format_date(self, datestr):
for format in self.INPUT_FORMATS:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment