Hello,

Thanks for replying!  Sorry for delayed response.

I am not using custom forms or custom templates.

It looks like, with "Save as new", django first makes a full copy of the 
base record and all the child records, including those that are marked for 
deletion, and then it subsequently tries to delete the ones that are marked 
for deletion before it saves everything, to avoid creating-then-deleting 
the records marked for deletion.  This makes sense.

In 1.7, deletion of child records fails because it appears to hash the 
child records as part of this processing, but the child records have not 
been saved to the database, so do not have an ID, so cannot be hashed.

This behavior of throwing an exception on attempts to hash objects with no 
ID is a relatively recent change, documented in this commit from 8/14/2013:

https://github.com/django/django/commit/6af05e7a0f0e4604d6a67899acaa99d73ec0dfaa

I am not sure what release this commit is first in, and I don't know too 
much about the core django code at work here.  If that commit was included 
in a version earlier than 1.7, then it might be a combination of it and 
changes to the save functionality to add hashing that are causing this 
problem.  If it was only introduced in 1.7, then it could be that this 
change is the cause of this problem, and the higher-level code that 
implements "Save as new" might not have been changed to deal with this case.

I'm happy to help as I can, but not sure how to proceed from here.

Thanks,

Jon

On Wednesday, November 12, 2014 3:42:43 PM UTC-5, Collin Anderson wrote:
>
> Hello,
>
> That does seem odd. Are you using a custom form or custom template at all?
>
> There shouldn't be a delete box for unsaved items, right?
>
> Collin
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7a8a17f7-9f78-4279-8cb2-ed69b685e07e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to