def change_seller_info(self, change_info, user, connection):
     account_dao = AccountDao()
     if change_info['seller_id'] != user['account_id'] and user[
             'account_type_id'] == 2:
         raise Exception('NO_AUTH')
     change_info['id'] = change_info.pop('seller_id')
     account_dao.update_seller(change_info, connection)
     seller_info = change_info
     account_info = account_dao.get_seller_info(seller_info, connection)
     account_info['seller_id'] = account_info.pop('id')
     account_info['editor_id'] = user['account_id']
     account_dao.create_seller_log(account_info, connection)
     return jsonify({'MESSAGE': 'SUCCESS'}), 200
 def change_status(self, status, user, connection):
     account_dao = AccountDao()
     actions = account_dao.get_seller_actions_two(status, connection)
     if not actions:
         raise Exception('Invalid action for status')
     new_status_id = actions[0]['new_status_id']
     seller_id = status['seller_id']
     change_info = {'id': seller_id, 'seller_status': new_status_id}
     account_dao.update_seller_status(change_info, connection)
     seller_info = {'id': seller_id}
     account_info = account_dao.get_seller_info(seller_info, connection)
     account_info['seller_id'] = account_info.pop('id')
     account_info['editor_id'] = user['account_id']
     account_dao.create_seller_log(account_info, connection)
     return actions