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

Reduced number of SQL queries when loading /api/admin/music/tracks/

parent 51dbd905
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ class AlbumAdmin(admin.ModelAdmin):
class TrackAdmin(admin.ModelAdmin):
list_display = ["title", "artist", "album", "mbid"]
search_fields = ["title", "artist__name", "album__title", "mbid"]
list_select_related = True
list_select_related = ["album__artist", "artist"]
@admin.register(models.ImportBatch)
......
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