Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
5160 Visualizações

Hi,


I want to call a function and perform a action as shown here:


def happy_man():


   notification = {


       'effect': {


           'fadeout': 'slow',


           'message': 'Congratz!',


           'type': 'rainbow_man',


       }


   }

   

   return notification

  

action = happy_man() and records.action_quotation_sent()


But it looks the function does not work. What am I doing wrong?

 
Avatar
Cancelar
Melhor resposta

Hi,

Do it like this in the order,


def test_function(self):
records.action_quotation_sent()
action = happy_man()

Thanks

Avatar
Cancelar
Autor

Thanks for your reply. Not sure what you mean. Should I make a separate second function? Or include the action_quatation within the happy_man function?

arrange code to two lines as show in above sample, first execute action_quotation_sent and in next line return the happy_man