Commit a8884120 authored by Francois Blackburn's avatar Francois Blackburn

outcall: do not allow to set strip_digits to none

strip_digits=None are no signification. Instead of migrate de DB, to
set the default=0, only the small condition is added
parent 4661d7f6
......@@ -60,6 +60,8 @@ class DialPattern(Base):
@strip_digits.setter
def strip_digits(self, value):
if value is None:
value = 0 # set default value
self.stripnum = value
@hybrid_property
......
......@@ -395,7 +395,6 @@ class TestEdit(DAOTestCase):
outcall.patterns = [DialPattern(external_prefix=None,
prefix=None,
pattern='XX',
strip_digits=None,
caller_id=None)]
outcall_dao.edit(outcall)
......@@ -407,7 +406,6 @@ class TestEdit(DAOTestCase):
ring_time=none(),
patterns=has_items(has_properties(external_prefix=none(),
prefix=none(),
strip_digits=none(),
caller_id=none()))))
......
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