Opened 16 years ago
Closed 15 years ago
#11682 closed (fixed)
[soc2009/admin-ui] index can be 0 causing saving model with inlines to fail
Description ¶
In forms/models.py r11400
678 try: 679 if index: 680 pk_value = self.get_queryset()[index].pk 681 else: 682 pk_value = None 683 except IndexError: 684 pk_value = None
'index' can be zero and therefore evaluate to False, pk_value is set to None, and the hidden AutoField is rendered without a pk value, causing a save to fail.
I did not see soc2009/admin-ui in version dropdown, so I left version empty.
Change History (4)
by , 16 years ago
Attachment: | admin-ui-11682.diff added |
---|
comment:1 by , 16 years ago
Has patch: | set |
---|
Not sure if this is the place to be filing tickets for SoC projects.
comment:2 by , 16 years ago
Keywords: | admin-ui added |
---|---|
Version: | → soc2009/admin-ui |
Note:
See TracTickets
for help on using tickets.
Check if index is not None