Opened 8 years ago
Closed 8 years ago
#26665 closed Bug (duplicate)
Model field default callable called twice in forms
Reported by: | Nitesh Lohchab | Owned by: | Nitesh Lohchab |
---|---|---|---|
Component: | Forms | Version: | 1.9 |
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 )
callable assigned to default parameter of a field called twice when adding a model entry via admin.
behaviour to reproduce this:
def abc(): print "this is abc" return "abc" class testt(models.Model): text = models.CharField(max_length=12, default=abc)
Now when you try to add this model via admin you will see "this is abc" printed twice in console.
Change History (4)
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
Description: | modified (diff) |
---|
comment:3 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 8 years ago
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Summary: | default callable called twice → Model field default callable called twice in forms |
Note:
See TracTickets
for help on using tickets.
Likely a duplicate of #11390.