Skip to content
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

feat: non-required fields optional in admin #308

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

zacharis278
Copy link
Contributor

@zacharis278 zacharis278 commented Aug 21, 2024

I've had problems with this in the past doing things like making a 'created' attempt in admin which shouldn't have a start/end date but Django requires it without an explicit blank=True. Came across it again trying to setup LTI providers for partners where we only want a support chat url and not a phone number but both are 'required' according to admin form logic.

Went through and fixed the fields that made sense to be optional. This only impacts the admin forms and not the DB (these are already null=True)

Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  edx_exams/apps/core
  models.py
  edx_exams/apps/core/migrations
  0028_admin_optional_fields.py
Project Total  

This report was generated by python-coverage-comment-action

Copy link
Member

@varshamenon4 varshamenon4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@zacharis278 zacharis278 merged commit fa54ff0 into main Aug 21, 2024
5 checks passed
@zacharis278 zacharis278 deleted the zhancock/django-admin-fields branch August 21, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants