diff --git a/salt/returners/mysql.py b/salt/returners/mysql.py index 4efb119fc9af..4ed50ce0515b 100644 --- a/salt/returners/mysql.py +++ b/salt/returners/mysql.py @@ -112,6 +112,8 @@ def returner(ret): sql = '''INSERT INTO `salt_returns` (`fun`, `jid`, `return`, `id`, `success`, `full_ret` ) VALUES (%s, %s, %s, %s, %s, %s)''' + if len(ret['return']) == str(ret['return']).count("'result': True"): + ret['success'] = True cur.execute(sql, (ret['fun'], ret['jid'], str(ret['return']), ret['id'], ret['success'], json.dumps(ret)))