File tree Expand file tree Collapse file tree
wazo_confd/plugins/outcall Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# SPDX-License-Identifier: GPL-3.0-or-later
33
44from flask import request , url_for
5+ from uuid import uuid4
56
67from xivo_dao .alchemy .outcall import Outcall
78
1415class OutcallList (ListResource ):
1516 model = Outcall
1617 schema = OutcallSchema
17- outcall_name_fmt = 'outcall-{tenant_slug}-{outcall_id }'
18+ outcall_name_fmt = 'outcall-{tenant_slug}-{outcall_uuid }'
1819
1920 def __init__ (self , tenant_dao , * args , ** kwargs ):
2021 super ().__init__ (* args , ** kwargs )
@@ -29,9 +30,11 @@ def post(self):
2930 form = self .add_tenant_to_form (form )
3031
3132 tenant = self ._tenant_dao .get (form ['tenant_uuid' ])
33+ # NOTE(afournier): we use a UUID as if it was the outcall UUID but it's not
34+ # Outcalls do not use UUIDs yet
3235 form ['name' ] = self .outcall_name_fmt .format (
3336 tenant_slug = tenant .slug ,
34- outcall_id = form [ 'id' ] ,
37+ outcall_uuid = uuid4 () ,
3538 )
3639 model = self .model (** form )
3740 model = self .service .create (model )
You can’t perform that action at this time.
0 commit comments