Fixed issue with editing photos.

The issue involved photos being overridden in the edit modal dialog
box. A fix for this was to return the id of the original photo and
store this so that we don’t override it by mistake.