-
Notifications
You must be signed in to change notification settings - Fork 48
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
fix: follow-up / updates related to ENT-9579 #2269
Conversation
3f31174
to
30b4ee7
Compare
""" | ||
Return a QuerySet of all model instances. | ||
""" | ||
return self.model.all_objects.get_queryset() |
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.
Ensures soft-deleted instances are still discoverable in Django Admin.
* Updates Django Admin fields for models.DefaultEnterpriseEnrollmentIntention * Ensures DefaultEnterpriseEnrollmentIntentionAdmin uses SoftDeletableModel's all_objects model manager to be able to view/restore soft-deleted instances. * Adds help text in Django Admin for SoftDeletableModel's is_removed boolean field. * Alters content_type model field to allow blank/null. * Adds unique constraint for enterprise_customer and content_key to prevent duplicates. * Remove `current_*` prefixes on computed properties since a configured content_key might not be the *current* course run. * Updates models.DefaultEnterpriseEnrollmentIntention `clean` method to check for soft-deleted duplicates to raise ValidationError. * Ensures `self.content_type` is already updated on save, even if already set (e.g., if content_key changes to a different content type). * Updates related tests.
30b4ee7
to
19f5833
Compare
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.
nice
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.
Great cleanup with super minor nits 👍🏽
* fix: updates to ENT-9579 * Updates Django Admin fields for models.DefaultEnterpriseEnrollmentIntention * Ensures DefaultEnterpriseEnrollmentIntentionAdmin uses SoftDeletableModel's all_objects model manager to be able to view/restore soft-deleted instances. * Adds help text in Django Admin for SoftDeletableModel's is_removed boolean field. * Alters content_type model field to allow blank/null. * Adds unique constraint for enterprise_customer and content_key to prevent duplicates. * Remove `current_*` prefixes on computed properties since a configured content_key might not be the *current* course run. * Updates models.DefaultEnterpriseEnrollmentIntention `clean` method to check for soft-deleted duplicates to raise ValidationError. * Ensures `self.content_type` is already updated on save, even if already set (e.g., if content_key changes to a different content type). * Updates related tests.
[context] Contribution to related PR #2264
current_*
prefixes on computed properties since a configured content_key might not be the current course run.clean
method to check for soft-deleted duplicates to raise ValidationError.self.content_type
is already updated on save, even if already set (e.g., if content_key changes to a different content type).Merge checklist:
requirements/*.txt
files)base.in
if needed in production but edx-platform doesn't install ittest-master.in
if edx-platform pins it, with a matching versionmake upgrade && make requirements
have been run to regenerate requirementsmake static
has been run to update webpack bundling if any static content was updated./manage.py makemigrations
has been run./manage.py lms makemigrations
in the shell.Post merge:
(so basically once your build finishes, after maybe a minute you should see the new version in PyPi automatically (on refresh))
make upgrade
in edx-platform will look for the latest version in PyPi.