def null_pks(page, data):
    """
    Nullifies primary keys within all supplied fields.

    Arguments:
    page -- Page object.
    data -- Page object in dictionary format.

    Returns:
    N/A. Overwrites the argument.
    """
    data['id'] = None
    data['pk'] = None
    for field_name, field_val in data.items():
        if type(field_val) != list:
            continue
        for i, sub_item in enumerate(field_val):
            if 'pk' in sub_item:
                data[field_name][i]['pk'] = None
