[Global] Multiple-clicking in creation forms results in duplicate objects
Bug Report
Description
When using a creation form for an object, e.g. Organizations
, one may click the submit button of the form multiple times by accident or otherwise. This will create as many copies of the object as numbers clicked. While facilities to remove such objects may exist, this should not be happening in the first place.
Behavior
Expected: A single item should have been created.
Actual: Multiple copies of the item are created.
Steps to Reproduce
- Fill in a creation form.
- Spam-click the submit button.
Additional Information
Since the content of the form is necessarily identical, a simple fix is to endow forms with the ability to check whether an identical object already exists in the database, and only perform .save()
if this is not the case.
Page URL(s)
/organizations/add/