Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2914 Widoki

Hi ,
 I want to do some backend process after return function in my controller ,
  @http.route('/web/logintest/', type='json', auth='public', method=['POST'],
                csrf=False)
  def my_function(self, *args, **kwargs):
return {
"message": "Success",
                        }
#backend process  nothing working after return function

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

Nothing will work after return function in this way .Try like below

@http.route('/web/logintest/', type='json', auth='public', method=['POST'],
csrf=False)
def my_fuction(self, *args, **kwargs):
try:
return {
"message": "Success",
}
finally:
# backend process

Hope it'll help

Awatar
Odrzuć