Fix bug found with failed cypress test
This commit is contained in:
parent
7d291b3e3f
commit
28c2425671
|
|
@ -54,7 +54,6 @@ def update_assignment_completion(
|
||||||
context
|
context
|
||||||
:param initialize_completion: if true, the completion will be created, but not updated
|
:param initialize_completion: if true, the completion will be created, but not updated
|
||||||
used as a workaround for initial work with the object on the frontend
|
used as a workaround for initial work with the object on the frontend
|
||||||
:return: AssignmentCompletion
|
|
||||||
"""
|
"""
|
||||||
if completion_data is None:
|
if completion_data is None:
|
||||||
completion_data = {}
|
completion_data = {}
|
||||||
|
|
@ -73,7 +72,7 @@ def update_assignment_completion(
|
||||||
|
|
||||||
if initialize_completion:
|
if initialize_completion:
|
||||||
# ignore further updates
|
# ignore further updates
|
||||||
return ac
|
return ac, True
|
||||||
|
|
||||||
if not is_valid_assignment_completion_status(completion_status):
|
if not is_valid_assignment_completion_status(completion_status):
|
||||||
raise serializers.ValidationError(
|
raise serializers.ValidationError(
|
||||||
|
|
@ -243,7 +242,7 @@ def update_assignment_completion(
|
||||||
completion_status=CourseCompletionStatus.SUCCESS.value,
|
completion_status=CourseCompletionStatus.SUCCESS.value,
|
||||||
)
|
)
|
||||||
|
|
||||||
return (ac, created)
|
return ac, created
|
||||||
|
|
||||||
|
|
||||||
def _remove_unknown_entries(assignment, completion_data):
|
def _remove_unknown_entries(assignment, completion_data):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue