Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-submissions
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-submissions
Commits
4407659e
Commit
4407659e
authored
Jul 21, 2017
by
Alex Dusenbery
Committed by
GitHub
Jul 21, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #63 from edx/jeskew/further_logging_field_errors
Fix exception printing and log upon error.
parents
6d4b7cc9
839d93e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
+7
-1
setup.py
+1
-1
submissions/api.py
+6
-0
No files found.
setup.py
View file @
4407659e
...
...
@@ -33,7 +33,7 @@ def load_requirements(*requirements_paths):
setup
(
name
=
'edx-submissions'
,
version
=
'2.0.
4
'
,
version
=
'2.0.
5
'
,
author
=
'edX'
,
description
=
'An API for creating submissions and scores.'
,
url
=
'http://github.com/edx/edx-submissions.git'
,
...
...
submissions/api.py
View file @
4407659e
...
...
@@ -89,6 +89,7 @@ class SubmissionRequestError(SubmissionError):
if
field_errors
is
not
None
else
{}
)
self
.
args
+=
(
self
.
field_errors
,)
def
__repr__
(
self
):
"""
...
...
@@ -991,6 +992,11 @@ def _get_or_create_student_item(student_item_dict):
student_item_serializer
=
StudentItemSerializer
(
data
=
student_item_dict
)
if
not
student_item_serializer
.
is_valid
():
logger
.
error
(
"Invalid StudentItemSerializer: {}"
.
format
(
unicode
(
student_item_serializer
.
errors
)
)
)
raise
SubmissionRequestError
(
field_errors
=
student_item_serializer
.
errors
)
return
student_item_serializer
.
save
()
except
DatabaseError
:
...
...
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