AssertionError in 3.15: "either include a queryset
attribute, or override the get_queryset()
method"
#9302
Answered
by
browniebroke
kevinrenskers
asked this question in
Potential Issue
-
I have a view where users can fetch and patch their own account settings: class AccountSettingsView(RetrieveUpdateAPIView):
serializer_class = AccountSettingsSerializer
permission_classes = [permissions.IsAuthenticated]
def get_object(self):
return AccountSettings.objects.get(user=self.request.user) Works fine with DRF 3.14 but with 3.15 this now fails: Why is this necessary now? I don't need a whole queryset if only one single object is supported, which it gets in |
Beta Was this translation helpful? Give feedback.
Answered by
browniebroke
Mar 19, 2024
Replies: 1 comment
-
See this issue: #9306 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kevinrenskers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See this issue: #9306