prevent insert when calling edit

This is most applicable to api calls