Opened 7 years ago
Closed 7 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 Changed 7 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 7 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 7 years ago by
Owner: | changed from nobody to Nitesh Lohchab |
---|---|
Status: | new → assigned |
comment:4 Changed 7 years ago by
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.