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
608ca88f
Commit
608ca88f
authored
May 12, 2015
by
Greg Price
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8007 from edx/gprice/discussion-api-thread-list-fix-type
Fix type field in thread list endpoint
parents
a998a3f3
6189cf9b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
lms/djangoapps/discussion_api/api.py
+1
-1
lms/djangoapps/discussion_api/tests/test_api.py
+4
-4
lms/djangoapps/discussion_api/tests/test_views.py
+1
-1
No files found.
lms/djangoapps/discussion_api/api.py
View file @
608ca88f
...
...
@@ -111,7 +111,6 @@ def _cc_thread_to_api_thread(thread, cc_user, staff_user_ids, ta_user_ids, group
"group_id"
,
"created_at"
,
"updated_at"
,
"type"
,
"title"
,
"pinned"
,
"closed"
,
...
...
@@ -127,6 +126,7 @@ def _cc_thread_to_api_thread(thread, cc_user, staff_user_ids, ta_user_ids, group
"community_ta"
if
int
(
thread
[
"user_id"
])
in
ta_user_ids
else
None
),
"type"
:
thread
[
"thread_type"
],
"raw_body"
:
thread
[
"body"
],
"following"
:
thread
[
"id"
]
in
cc_user
[
"subscribed_thread_ids"
],
"abuse_flagged"
:
cc_user
[
"id"
]
in
thread
[
"abuse_flaggers"
],
...
...
lms/djangoapps/discussion_api/tests/test_api.py
View file @
608ca88f
...
...
@@ -369,7 +369,7 @@ class GetThreadListTest(CommentsServiceMockMixin, ModuleStoreTestCase):
"anonymous_to_peers"
:
False
,
"created_at"
:
"1970-01-01T00:00:00Z"
,
"updated_at"
:
"1970-01-01T00:00:00Z"
,
"type"
:
"discussion"
,
"t
hread_t
ype"
:
"discussion"
,
"title"
:
"dummy"
,
"body"
:
"dummy"
,
"pinned"
:
False
,
...
...
@@ -421,7 +421,7 @@ class GetThreadListTest(CommentsServiceMockMixin, ModuleStoreTestCase):
"anonymous_to_peers"
:
False
,
"created_at"
:
"2015-04-28T00:00:00Z"
,
"updated_at"
:
"2015-04-28T11:11:11Z"
,
"type"
:
"discussion"
,
"t
hread_t
ype"
:
"discussion"
,
"title"
:
"Test Title"
,
"body"
:
"Test body"
,
"pinned"
:
False
,
...
...
@@ -442,7 +442,7 @@ class GetThreadListTest(CommentsServiceMockMixin, ModuleStoreTestCase):
"anonymous_to_peers"
:
False
,
"created_at"
:
"2015-04-28T22:22:22Z"
,
"updated_at"
:
"2015-04-28T00:33:33Z"
,
"type"
:
"question"
,
"t
hread_t
ype"
:
"question"
,
"title"
:
"Another Test Title"
,
"body"
:
"More content"
,
"pinned"
:
False
,
...
...
@@ -463,7 +463,7 @@ class GetThreadListTest(CommentsServiceMockMixin, ModuleStoreTestCase):
"anonymous_to_peers"
:
False
,
"created_at"
:
"2015-04-28T00:44:44Z"
,
"updated_at"
:
"2015-04-28T00:55:55Z"
,
"type"
:
"discussion"
,
"t
hread_t
ype"
:
"discussion"
,
"title"
:
"Yet Another Test Title"
,
"body"
:
"Still more content"
,
"pinned"
:
True
,
...
...
lms/djangoapps/discussion_api/tests/test_views.py
View file @
608ca88f
...
...
@@ -154,7 +154,7 @@ class ThreadViewSetListTest(DiscussionAPIViewTestMixin, ModuleStoreTestCase):
"anonymous_to_peers"
:
False
,
"created_at"
:
"2015-04-28T00:00:00Z"
,
"updated_at"
:
"2015-04-28T11:11:11Z"
,
"type"
:
"discussion"
,
"t
hread_t
ype"
:
"discussion"
,
"title"
:
"Test Title"
,
"body"
:
"Test body"
,
"pinned"
:
False
,
...
...
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