Multiple outputs issue: callback runs more than once

Hi guys,

I’m observing a strange behavior while using multiple outputs within a callback. The idea is to show a message if user hasn’t entered all required info. Once all data is input, save it to a database, then show message so user knows data was saved.

However, the problem is when the message of missing data triggers, it will show up 3 times using the code below. And I’ve seen that if you move the Output('confd_colleague_missing_inputs to the middle of the list (position 2) then it shows up 2 times. If you place at the end of the list (position 3) then it displays only once!

Looks like a bug to me. Can you help me understand if I’m doing something wrong here?

              State('txt_colleague_name', 'value'),
              State('dropd_colleague_role', 'value')])
def btn_save_colleague(clicks, idval, nameval, roleval):
    #Logic for new colleagues
    if clicks == 0:
        return False, False, False
        if idval == '':
            if nameval != '' and roleval != None:
                str_sql = """
                        INSERT INTO poc.colleagues (full_name, mck_role)
                        VALUES (%s,%s);
                df = pd.DataFrame({'full_name':[nameval],
                execute_sql(str_sql, 'many', df=df)
                return False, False, True
                return True , False, False
            return False, False, False