Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-notes-api
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-notes-api
Commits
5ee1a3a8
Commit
5ee1a3a8
authored
Dec 30, 2014
by
Oleg Marshev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User already checked in permissions.
parent
1e2e4a40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
14 deletions
+0
-14
notesapi/v1/views.py
+0
-14
No files found.
notesapi/v1/views.py
View file @
5ee1a3a8
...
@@ -117,10 +117,6 @@ class AnnotationDetailView(APIView):
...
@@ -117,10 +117,6 @@ class AnnotationDetailView(APIView):
except
Note
.
DoesNotExist
:
except
Note
.
DoesNotExist
:
return
Response
(
'Annotation not found! No update performed.'
,
status
=
status
.
HTTP_404_NOT_FOUND
)
return
Response
(
'Annotation not found! No update performed.'
,
status
=
status
.
HTTP_404_NOT_FOUND
)
# changing user_id is not permitted
if
note
.
user_id
!=
self
.
request
.
DATA
[
'user'
]:
return
Response
(
status
=
status
.
HTTP_400_BAD_REQUEST
)
try
:
try
:
note
.
clean
(
self
.
request
.
DATA
)
note
.
clean
(
self
.
request
.
DATA
)
except
ValidationError
as
e
:
except
ValidationError
as
e
:
...
@@ -146,13 +142,3 @@ class AnnotationDetailView(APIView):
...
@@ -146,13 +142,3 @@ class AnnotationDetailView(APIView):
# Annotation deleted successfully.
# Annotation deleted successfully.
return
Response
(
status
=
status
.
HTTP_204_NO_CONTENT
)
return
Response
(
status
=
status
.
HTTP_204_NO_CONTENT
)
def
_convert_to_int
(
value
,
default
=
None
):
"""
Convert given value to int.
"""
try
:
return
int
(
value
or
default
)
except
ValueError
:
return
default
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