Opened 7 months ago

Closed 7 months ago

#23301 closed Bug (worksforme)

DateField doesn't work when called 'date'

Reported by: fletom Owned by: nobody
Component: Database layer (models, ORM) Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by fletom)

When called anything else it seems to work fine.

m = MyModel(date = datetime.date.today())
m.save()
MyModel.objects.get().date # None

# models.py
class MyModel(models.Model):
        date = models.DateField()

Running Django 1.6.5. Let me know what else is required to debug/reproduce.

Edit: after some testing/process of elimination, it looks like the bug isn't quite that simple. Stand by while I figure out exactly how to reproduce it.

Edit #2: Well, at first I observed this in one of my models, then I created a TestModel and obvserved the same thing. Changing the field in either model to 'not_called_date' seemed to fix the issue. Now only a few minutes later I can't reproduce the bug at all, no matter what I call the field. I'll mark this as closed for now, but maybe somebody else will encounter something similar in the future.

Change History (2)

comment:1 Changed 7 months ago by fletom

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 7 months ago by fletom

  • Description modified (diff)
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top