def handle_save_embeds(sender, instance, **kwargs):
    embedded_media_fields = FieldRegistry.get_fields(sender)
    if not embedded_media_fields:
        return
    
    urls = []
    for field in instance._meta.fields:
        if isinstance(field, TextField):
            urls.extend(re.findall(URL_RE, getattr(instance, field.name)))

    urls = set(urls)
    for embedded_field in embedded_media_fields:
        m2m = getattr(instance, embedded_field.name)
        m2m.clear()
        for url in urls:
            try:
                provider = oembed.site.provider_for_url(url)
            except OEmbedMissingEndpoint:
                pass
            else:
                if not embedded_field.media_type or \
                        embedded_field.media_type in provider.resource_type:
                    media_obj, created = AggregateMedia.objects.get_or_create(url=url)
                    m2m.add(media_obj)
dataset/ETHPy150Open worldcompany/djangoembed/oembed/fields.py/handle_save_embeds/swapped operands of `in`