#33075: '__date' returns None in MySQL while it returns date object in Sqlite3 -----------------------------------------+------------------------ Reporter: muhanpixie | Owner: nobody Type: Bug | Status: new Component: Uncategorized | Version: 3.2 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -----------------------------------------+------------------------ database: mysql 5.7 django version: 3.2 python version: 3.8.1
{{{Model.objects.values('some_datetime_field__date',) }}} returns None in MYSQL {{{ class Inbound(models.Model): effective_date = models.DateTimeField(null=False, blank=True) number = models.IntegerField() # other fields. daily_changes = Inbound.objects.all().values('effective_date__date')\ .annotate(total_change=Sum('number')). Inbound.objects.values('effective_date__date') }}} just returns Nones in Mysql -- Ticket URL: <https://code.djangoproject.com/ticket/33075> 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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/053.91fbb4263b26b69960803e9047d4826d%40djangoproject.com.