def do_remove_realm_filter(realm: Realm, pattern: Optional[str]=None, id: Optional[int]=None) -> None:
    if (pattern is not None):
        RealmFilter.objects.get(realm=realm, pattern=pattern).delete()
    else:
        RealmFilter.objects.get(realm=realm, pk=id).delete()
    notify_realm_filters(realm)
def do_remove_realm_filter(realm: Realm, pattern: Optional[str]=None, id: Optional[int]=None) -> None:
    if (pattern is not None):
        RealmFilter.objects.get(realm=realm, pattern=pattern).delete()
    else:
        RealmFilter.objects.get(realm=realm, pk=id).delete()
    notify_realm_filters(realm)