Opened 10 years ago

Closed 10 years ago

#23301 closed Bug (worksforme)

DateField doesn't work when called 'date'

Reported by: Fletcher Tomalty 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 Fletcher Tomalty)

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 by Fletcher Tomalty, 10 years ago

Description: modified (diff)

comment:2 by Fletcher Tomalty, 10 years ago

Description: modified (diff)
Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top