Fixed upsert method in reference module (GONRG-3573)
All Submissions:
- [YES/NO] I have added an explanation of what changes in this merge do and why we should include it?
- [YES/NO] I have updated the documentation accordingly.
- [NA] I have added tests to cover my changes.
- [YES] All new and existing tests passed.
- [YES] My code follows the code style of this project.
- [YES] I ran lint checks locally prior to submission.
What is the current behavior?
Issue: Remember to link the workitem to this pull request. The item creation is using save method of MongoDB. It is identical with upsert, thus, we could overwrite data in existed item by accident.
What is the new behavior?
The item creation is using insert method. The existed item will not be overwritten by creation of the clone, there will be an error instead
Does this introduce a breaking change?
- [NO]
Any relevant logs, error output, etc?
(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)