File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ class Meta(UserSerializer.Meta):
37
37
extra_kwargs = {
38
38
'password' : {'write_only' : True },
39
39
'avatar_thumbnail' : {'read_only' : True },
40
+ 'name' : {'required' : False },
41
+ 'phone_number' : {'required' : False },
42
+ 'avatar' : {'required' : False },
40
43
}
41
44
42
45
Original file line number Diff line number Diff line change @@ -7,10 +7,10 @@ class IsTeacherOrReadOnly(IsAuthenticated):
7
7
8
8
def has_permission (self , request , view ):
9
9
is_authenticated = super ().has_permission (request , view )
10
- is_teacher = request .user .is_teacher ()
11
10
return (
12
11
is_authenticated and (
13
- request .method in SAFE_METHODS or is_teacher
12
+ request .method in SAFE_METHODS or
13
+ request .user .is_teacher ()
14
14
)
15
15
)
16
16
Original file line number Diff line number Diff line change @@ -11,9 +11,7 @@ def get(self, request):
11
11
if request .user .is_authenticated :
12
12
data = {
13
13
'account' : request .build_absolute_uri ('/account/' ),
14
- 'teacher' : {
15
- 'classroom' : request .build_absolute_uri ('/classroom/' ),
16
- }
14
+ 'classroom' : request .build_absolute_uri ('/classroom/' ),
17
15
}
18
16
else :
19
17
data = {
You can’t perform that action at this time.
0 commit comments