1👍
✅
Try like this
if artist_id:
tattoos = tattoos.filter(artist__id=artist_id).values()
return JsonResponse({'tattoos_by_artist': list(tattoos)}, status=200)
Source:stackexchange.com