def fix_field_cache(model):
    """
    Remove duplicate entries in the field cache of the specified model
    in order to fix Django issue #10808
    """
    new_cache = []
    used_fields = {}
    for parent in model._meta.get_parent_list():
        for f in parent._meta.local_fields:
            used_fields[f.name] = f
            used_fields[f.attname] = f
    for f in model._meta.local_fields:
        if not (used_fields.get(f.name) or used_fields.get(f.attname) or None):
            new_cache.append(f)
    model._meta.local_fields = new_cache
