Unverified Commit e0ef3f3a authored by Agate's avatar Agate 💬
Browse files

Fixed invalid filtersets config

parent cc40492f
......@@ -85,8 +85,6 @@ class ArtistFilter(
model = models.Artist
fields = {
"name": ["exact", "iexact", "startswith", "icontains"],
"playable": ["exact"],
"scope": ["exact"],
"mbid": ["exact"],
}
hidden_content_fields_mapping = moderation_filters.USER_FILTER_CONFIG["ARTIST"]
......@@ -122,11 +120,9 @@ class TrackFilter(
model = models.Track
fields = {
"title": ["exact", "iexact", "startswith", "icontains"],
"playable": ["exact"],
"id": ["exact"],
"album": ["exact"],
"license": ["exact"],
"scope": ["exact"],
"mbid": ["exact"],
}
hidden_content_fields_mapping = moderation_filters.USER_FILTER_CONFIG["TRACK"]
......@@ -173,7 +169,6 @@ class UploadFilter(audio_filters.IncludeChannelsFilterSet):
class Meta:
model = models.Upload
fields = [
"playable",
"import_status",
"mimetype",
"track",
......@@ -181,7 +176,6 @@ class UploadFilter(audio_filters.IncludeChannelsFilterSet):
"album_artist",
"library",
"import_reference",
"scope",
"channel",
]
include_channels_field = "track__artist__channel"
......@@ -209,7 +203,7 @@ class AlbumFilter(
class Meta:
model = models.Album
fields = ["playable", "q", "artist", "scope", "mbid"]
fields = ["artist", "mbid"]
hidden_content_fields_mapping = moderation_filters.USER_FILTER_CONFIG["ALBUM"]
include_channels_field = "artist__channel"
channel_filter_field = "track__album"
......@@ -226,4 +220,4 @@ class LibraryFilter(filters.FilterSet):
class Meta:
model = models.Library
fields = ["privacy_level", "q", "scope"]
fields = ["privacy_level"]
......@@ -33,9 +33,6 @@ class PlaylistFilter(filters.FilterSet):
fields = {
"user": ["exact"],
"name": ["exact", "icontains"],
"q": "exact",
"playable": "exact",
"scope": "exact",
}
def filter_playable(self, queryset, name, value):
......
......@@ -11,5 +11,4 @@ class RadioFilter(django_filters.FilterSet):
model = models.Radio
fields = {
"name": ["exact", "iexact", "startswith", "icontains"],
"scope": "exact",
}
......@@ -18,4 +18,4 @@ class TagFilter(filters.FilterSet):
class Meta:
model = models.Tag
fields = {"q": ["exact"], "name": ["exact", "startswith"]}
fields = {"name": ["exact", "startswith"]}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment