OxBRCInformatics / greenlight

Open Source consent management tool
5 stars 3 forks source link

Fix conflict in annotating an attachment by two users at the same time #102

Closed SoheilSaif closed 9 years ago

SoheilSaif commented 9 years ago

What we have: When: Two users annotate the same attachment simultaneously Then: They both save the attachment but a conflict occurs in the object model! Problem: two ConsentFrom objects will be attached to one attachment and this will result in such an error "More than one row with the given identifier was found: 1, for class: uk.ac.ox.brc.greenlight.ConsentForm"

What we expect: When: Two users annotate the same form simultaneously Then: They both save the attachment without any conflict in the object model! Solution: Before saving the consent form, we need to check if this attachment has a consent from object attached to it and if yes, it should generate a proper message to the end user.