Commit 1cb0accc authored by Francois Blackburn's avatar Francois Blackburn Committed by Etienne Lessard

outcall: fix nebulous creation error with relation

My comprehension:
When there are relationship,
 extension -> dialpattern -> outcall
 outcall   -> dialpattern -> extension
And we create DialPattern with extension, then extension will try to
create (or flush) DialPattern with dialpattern.typeid = none. That is to
say, before that outcall insert dialpattern.typeid
My comprehension is as clear as these explanations ...
parent 1ebb5d87
......@@ -110,9 +110,10 @@ class Outcall(Base):
extension.type = 'outcall'
dialpattern = DialPattern(type='outcall',
exten=extension.exten,
extension=extension,
**kwargs)
self.dialpatterns.append(dialpattern)
index = self.dialpatterns.index(dialpattern)
self.dialpatterns[index].extension = extension
self._fix_context()
def dissociate_extension(self, extension):
......
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