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

Wondering why null=True? #57

Open
ShmuelTreiger opened this issue Nov 29, 2021 · 1 comment
Open

Wondering why null=True? #57

ShmuelTreiger opened this issue Nov 29, 2021 · 1 comment

Comments

@ShmuelTreiger
Copy link

For my purposes I'd rather have null=False and it errors out if the value is None. Wondering the thought process on enforcing null=True?

@zachbellay
Copy link

@ShmuelTreiger My assumption is that you can create objects without having a logged in user. For example, if you run python manage.py createsuperuser there is no logged in user, so the created_by field should be None. Another situation might be for an async task. In essence, the case where created_by=None would be where the system created the object.

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

No branches or pull requests

2 participants