DH-IT-Portal-Development / ethics

Ethical Committee web application in Django
http://fetc.hum.uu.nl
MIT License
2 stars 1 forks source link

Revise attachments while preserving older versions #719

Closed miggol closed 1 week ago

miggol commented 1 month ago

If you edit an attachment that is already attached to something else, the portal will instead seamlessly save a copy so older proposals don't change.

To test:

Revise an application with an Attachment attached. Modify the attachment in the revision, and note that it gets a new pk while keeping all attributes that you would expect. The old application and its attachment will remain unchanged.

If this looks simple know that I played around with this a lot before getting it right, and the whole rest of the attachments system is pretty much built around this part being easy. Still proud of it, though!

miggol commented 4 weeks ago

I've fixed the creation bug, thanks for pointing that out. I've made the solution quite a bit more verbose to clarify what's going on.