Skip to content
Snippets Groups Projects
Verified Commit 5111fbc4 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Support filtering by MBID in API

parent 86c7cd54
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ class ArtistFilter(moderation_filters.HiddenContentFilterSet):
"name": ["exact", "iexact", "startswith", "icontains"],
"playable": "exact",
"scope": "exact",
"mbid": "exact",
}
hidden_content_fields_mapping = moderation_filters.USER_FILTER_CONFIG["ARTIST"]
......@@ -60,6 +61,7 @@ class TrackFilter(moderation_filters.HiddenContentFilterSet):
"album": ["exact"],
"license": ["exact"],
"scope": "exact",
"mbid": "exact",
}
hidden_content_fields_mapping = moderation_filters.USER_FILTER_CONFIG["TRACK"]
......@@ -123,7 +125,7 @@ class AlbumFilter(moderation_filters.HiddenContentFilterSet):
class Meta:
model = models.Album
fields = ["playable", "q", "artist", "scope"]
fields = ["playable", "q", "artist", "scope", "mbid"]
hidden_content_fields_mapping = moderation_filters.USER_FILTER_CONFIG["ALBUM"]
def filter_playable(self, queryset, name, value):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment