Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
ff515eca
Unverified
Commit
ff515eca
authored
6 years ago
by
Zainab Amir
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Add Comments to verify_student/views.py
parents
8eba343a
68a40cd7
Branches
Branches containing commit
Tags
release-2021-03-25-05.28
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/verify_student/views.py
+5
-0
5 additions, 0 deletions
lms/djangoapps/verify_student/views.py
with
5 additions
and
0 deletions
lms/djangoapps/verify_student/views.py
+
5
−
0
View file @
ff515eca
...
...
@@ -1165,6 +1165,11 @@ def results_callback(request):
verification
=
SoftwareSecurePhotoVerification
.
objects
.
filter
(
status
=
'
approved
'
,
user_id
=
attempt
.
user_id
)
if
verification
:
log
.
info
(
u
'
Making expiry date of previous approved verification NULL for {}
'
.
format
(
attempt
.
user_id
))
# The updated_at field in sspv model has auto_now set to True, which means any time save() is called on
# the model instance, `updated_at` will change. Some of the existing functionality of verification
# (showing your verification has expired on dashboard) relies on updated_at.
# In case the attempt.approve() fails for some reason and to not cause any inconsistencies in existing
# functionality update() is called instead of save()
previous_verification
=
verification
.
latest
(
'
updated_at
'
)
SoftwareSecurePhotoVerification
.
objects
.
filter
(
pk
=
previous_verification
.
pk
).
update
(
expiry_date
=
None
,
expiry_email_date
=
None
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment