I changed the code to replace the old item with the new one from the edit item view.