mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[FIX] website_sale_signifyd: refactor to actually change response code
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
from odoo.http import Controller, request, route
|
from odoo.http import Controller, request, route
|
||||||
from odoo.exceptions import MissingError
|
from werkzeug.exceptions import NotFound
|
||||||
|
|
||||||
|
|
||||||
class SignifydWebhooks(Controller):
|
class SignifydWebhooks(Controller):
|
||||||
@@ -22,7 +22,7 @@ class SignifydWebhooks(Controller):
|
|||||||
if case_id == 1:
|
if case_id == 1:
|
||||||
# Special case when verifying webhook.
|
# Special case when verifying webhook.
|
||||||
return {'response': 'success'}
|
return {'response': 'success'}
|
||||||
raise MissingError('CaseId: %s Cannot be found.' % (case_id, ))
|
raise NotFound('CaseId: %s Cannot be found.' % (case_id,))
|
||||||
|
|
||||||
def _get_case(self, case_id):
|
def _get_case(self, case_id):
|
||||||
return request.env['signifyd.case'].sudo().search([('case_id', '=', case_id)], limit=1)
|
return request.env['signifyd.case'].sudo().search([('case_id', '=', case_id)], limit=1)
|
||||||
|
|||||||
Reference in New Issue
Block a user