Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
2f4defa6
Commit
2f4defa6
authored
Nov 10, 2014
by
Zia Fazal
Committed by
Jonathan Piacenti
Aug 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ziafazal/api-update-user-time-when-emtpy:accept empty user title
added comment
parent
71aacb36
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
lms/djangoapps/api_manager/courses/tests.py
+1
-1
lms/djangoapps/api_manager/users/tests.py
+1
-0
lms/djangoapps/api_manager/users/views.py
+2
-2
No files found.
lms/djangoapps/api_manager/courses/tests.py
View file @
2f4defa6
...
...
@@ -227,7 +227,7 @@ class CoursesApiTests(ModuleStoreTestCase):
)
self
.
test_course_id
=
unicode
(
self
.
course
.
id
)
self
.
test_bogus_course_id
=
'
i4x://
foo/bar/baz'
self
.
test_bogus_course_id
=
'foo/bar/baz'
self
.
test_course_name
=
self
.
course
.
display_name
self
.
test_course_number
=
self
.
course
.
number
self
.
test_course_org
=
self
.
course
.
org
...
...
lms/djangoapps/api_manager/users/tests.py
View file @
2f4defa6
...
...
@@ -458,6 +458,7 @@ class UsersApiTests(ModuleStoreTestCase):
data
[
"country"
]
=
"US"
data
[
"year_of_birth"
]
=
"1990"
data
[
"title"
]
=
""
response
=
self
.
do_post
(
test_uri
,
data
)
self
.
assertEqual
(
response
.
status_code
,
200
)
response
=
self
.
do_get
(
test_uri
)
...
...
lms/djangoapps/api_manager/users/views.py
View file @
2f4defa6
...
...
@@ -563,8 +563,8 @@ class UsersDetail(SecureAPIView):
gender
=
request
.
DATA
.
get
(
'gender'
)
if
gender
:
existing_user_profile
.
gender
=
gender
title
=
request
.
DATA
.
get
(
'title'
)
if
title
:
# Empty title is also allowed
title
=
request
.
DATA
.
get
(
'title'
,
None
)
existing_user_profile
.
title
=
title
avatar_url
=
request
.
DATA
.
get
(
'avatar_url'
)
if
avatar_url
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment