質問編集履歴

2

追加修正

2020/11/03 12:56

投稿

Msk07
Msk07

スコア26

test CHANGED
File without changes
test CHANGED
@@ -9,8 +9,6 @@
9
9
  > 'LoginViewSet' should either include a `queryset` attribute, or override the `get_queryset()` method.
10
10
 
11
11
 
12
-
13
- mail_addressの名称が間違っているのではないかというエラーメッセージが発生するのですが、どのように修正すべきかわかりません。
14
12
 
15
13
  ● tree
16
14
 

1

エラー内容を別のものと間違っていたため

2020/11/03 12:55

投稿

Msk07
Msk07

スコア26

test CHANGED
File without changes
test CHANGED
@@ -6,11 +6,7 @@
6
6
 
7
7
  ● エラー内容
8
8
 
9
- > Got AttributeError when attempting to get a value for field `mail_address` on serializer `UserSerializer`.
10
-
11
- The serializer field might be named incorrectly and not match any attribute or key on the `QuerySet` instance.
9
+ > 'LoginViewSet' should either include a `queryset` attribute, or override the `get_queryset()` method.
12
-
13
- Original exception text was: 'QuerySet' object has no attribute 'mail_address'.
14
10
 
15
11
 
16
12
 
@@ -98,7 +94,7 @@
98
94
 
99
95
  def sign_in(self, request):
100
96
 
101
- serialized_user = UserSerializer(user_info.objects.all())
97
+ serialized_user = UserSerializer(user_info.objects.all(), many=True)
102
98
 
103
99
  return Response(serialized_user.data)
104
100