Skip to content
Permalink
Browse files

🚑 website compatibility

  • Loading branch information...
trojikman committed Jul 27, 2019
1 parent 6f8bb75 commit 6dede99fcbc577715e5ad2879f335f2afe4302ca
Showing with 5 additions and 4 deletions.
  1. +5 −4 saas_public/controllers/saas_public.py
@@ -5,13 +5,14 @@


class SaaSPublicController(Controller):
@route('/saas_public/<model("saas.template"):template_id>/create-fast-build', type='http', auth='public')
@route('/saas_public/<int:template_id>/create-fast-build', type='http', auth='public')
def create_fast_build(self, template_id, **kwargs):
if not kwargs:
kwargs = {}
if template_id and template_id.sudo().public_access:
template_operator_id = template_id.sudo().operator_ids.random_ready_operator()
build = template_operator_id.sudo().create_db(kwargs, with_delay=False)
template = request.env['saas.template'].browse(template_id).sudo()
if template and template.public_access:
template_operator_id = template.operator_ids.random_ready_operator()
build = template_operator_id.create_db(kwargs, with_delay=False)
build_url = build.get_url()
return request.env['auth_quick_master.token'].sudo().redirect_with_token(build_url, build.id,
build_login='admin')

0 comments on commit 6dede99

Please sign in to comment.
You can’t perform that action at this time.