Update API vies and serializers for the latest Django REST framework version. Replace DRF Swagger with DRF-YASG.
Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
committed by
Roberto Rosario
parent
77a3c103d1
commit
4378b28777
@@ -201,12 +201,15 @@ class APIUserGroupList(generics.ListCreateAPIView):
|
||||
"""
|
||||
Extra context provided to the serializer class.
|
||||
"""
|
||||
return {
|
||||
'format': self.format_kwarg,
|
||||
'request': self.request,
|
||||
'user': self.get_user(),
|
||||
'view': self
|
||||
}
|
||||
context = super(APIUserGroupList, self).get_serializer_context()
|
||||
if self.kwargs:
|
||||
context.update(
|
||||
{
|
||||
'user': self.get_user(),
|
||||
}
|
||||
)
|
||||
|
||||
return context
|
||||
|
||||
def get_queryset(self):
|
||||
user = self.get_user()
|
||||
|
||||
Reference in New Issue
Block a user