Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
5191 Переглядів

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?

 
Аватар
Відмінити
Найкраща відповідь

Hi,

Do it like this in the order,


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

Thanks

Аватар
Відмінити
Автор

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