-
Notifications
You must be signed in to change notification settings - Fork 4.3k
fix: add should_display_status_to_user method and status_changed field to VerificationAttempt model #35514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ilee2u
merged 18 commits into
master
from
ilee2u/add-missing-VerificationAttempt-methods-fields
Sep 26, 2024
Merged
fix: add should_display_status_to_user method and status_changed field to VerificationAttempt model #35514
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
cd380e5
fix: add placeholder should_display_status_to_user
ilee2u 790ee49
fix: have VerificationAttempt inherit StatusModel
ilee2u 4334120
chore: makemigrations
ilee2u 1c5ed0c
feat: status_changed field added
ilee2u b7e6211
temp: idea to add should_display_status_to_user
ilee2u 2b0d5a8
feat: add should_display_status_to_user
ilee2u 8d579be
fix: correct call in helpers+services
ilee2u 29d1985
chore: lint+test fix
ilee2u d1763b2
fix: default hide_status_user as False
ilee2u 8baffee
chore: rename field call to STATUS
ilee2u eefe970
chore: remove extra status field
ilee2u 332fd0c
temp: lint + comment out created status for now
ilee2u 6fc1aae
fix: revamp status_changed for back-compat
ilee2u 11355a2
fix: override save for status_changed
ilee2u 72f7e26
fix: replace created/updated instead of status
ilee2u e5a2e83
fix: squash commits
ilee2u f3f7b9f
chore: nits
ilee2u 775a57a
chore: revise migrations
ilee2u File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
lms/djangoapps/verify_student/migrations/0016_remove_verificationattempt_created_and_more.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Generated by Django 4.2.15 on 2024-09-26 20:08 | ||
|
|
||
| from django.db import migrations, models | ||
| import django.utils.timezone | ||
| import lms.djangoapps.verify_student.statuses | ||
| import model_utils.fields | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('verify_student', '0015_verificationattempt'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RemoveField( | ||
| model_name='verificationattempt', | ||
| name='created', | ||
| ), | ||
| migrations.RemoveField( | ||
| model_name='verificationattempt', | ||
| name='modified', | ||
| ), | ||
| migrations.AddField( | ||
| model_name='verificationattempt', | ||
| name='created_at', | ||
| field=models.DateTimeField(auto_now_add=True, db_index=True, default=django.utils.timezone.now), | ||
| preserve_default=False, | ||
| ), | ||
| migrations.AddField( | ||
| model_name='verificationattempt', | ||
| name='hide_status_from_user', | ||
| field=models.BooleanField(default=False, null=True), | ||
| ), | ||
| migrations.AddField( | ||
| model_name='verificationattempt', | ||
| name='status_changed', | ||
| field=model_utils.fields.MonitorField(default=django.utils.timezone.now, monitor='status', verbose_name='status changed'), | ||
| ), | ||
| migrations.AddField( | ||
| model_name='verificationattempt', | ||
| name='updated_at', | ||
| field=models.DateTimeField(auto_now=True, db_index=True), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='verificationattempt', | ||
| name='status', | ||
| field=model_utils.fields.StatusField(choices=[(lms.djangoapps.verify_student.statuses.VerificationAttemptStatus['CREATED'], lms.djangoapps.verify_student.statuses.VerificationAttemptStatus['CREATED']), (lms.djangoapps.verify_student.statuses.VerificationAttemptStatus['PENDING'], lms.djangoapps.verify_student.statuses.VerificationAttemptStatus['PENDING']), (lms.djangoapps.verify_student.statuses.VerificationAttemptStatus['APPROVED'], lms.djangoapps.verify_student.statuses.VerificationAttemptStatus['APPROVED']), (lms.djangoapps.verify_student.statuses.VerificationAttemptStatus['DENIED'], lms.djangoapps.verify_student.statuses.VerificationAttemptStatus['DENIED'])], default=lms.djangoapps.verify_student.statuses.VerificationAttemptStatus['CREATED'], max_length=100, no_check_for_status=True, verbose_name='status'), | ||
| ), | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zach helped me come up with this param/var, which we could add to the api function as such.