django-closuretree
django-closuretree copied to clipboard
Wrap saving operations in a transaction
The current implementation seems to break the closure tree when we try to save an instance with dirty parent value (i.e. referencing self or child). This causes db constraint failure, so I suggest we wrap the saving operation in a transaction to detect and reject dirty data.