|Reported by:||programmerq||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Consider the following model:
ticket = models.ForeignKey(Ticket, edit_inline=TABULAR, num_in_admin=1)
timestamp = DateTimeField(auto_now_add=True)
When I edit a Ticket that has one or more comments already, when I hit save I get the error: myproj_comment.timestamp may not be NULL
It appears that the inline editing in the admin doesn't honor the "auto_now_add=True" option. I can edit or create a comment directly without problem.
The workaround I've done is to simply override the save() method and set timestamp to now() if it doesn't exist.