#17294: django.utils.timezone functions raise AttributeError if DateTimeField allows null -------------------------------------+------------------------------------- Reporter: pressureman | Owner: aaugustin Type: Bug | Status: new Component: | Version: SVN Internationalization | Resolution: Severity: Normal | Triage Stage: Keywords: | Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by aaugustin): By design, these functions expect to receive a datetime object and don't check the type of their argument. It's the caller's job to ensure that they aren't called with `None`, or a string, etc. If I understand correctly, creating a model with a nullable !DateTimeField and saving it without a value in the admin should trigger the problem? -- Ticket URL: <https://code.djangoproject.com/ticket/17294#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.