Update api.py

Fixed accessor in queryset.