Are you sure it wasn't supposed to be ``if not data['asset_id'] or not date['ralph_id']:``?