Fixed really slow SQL
This commit is contained in:
parent
8b0ce6ad33
commit
1295144681
6 changed files with 19 additions and 12 deletions
|
|
@ -373,6 +373,7 @@ def test_manage_nested_artist_serializer(factories, now, to_api_date):
|
|||
|
||||
def test_manage_album_serializer(factories, now, to_api_date):
|
||||
album = factories["music.Album"](attributed=True, with_cover=True)
|
||||
factories["music.Track"](album=album)
|
||||
setattr(album, "_tracks_count", 42)
|
||||
expected = {
|
||||
"id": album.id,
|
||||
|
|
@ -389,7 +390,7 @@ def test_manage_album_serializer(factories, now, to_api_date):
|
|||
album.attributed_to
|
||||
).data,
|
||||
"tags": [],
|
||||
"tracks_count": 42,
|
||||
"tracks_count": 1,
|
||||
}
|
||||
s = serializers.ManageAlbumSerializer(album)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue