update photo_source with begin; rescue; end instead of chained if-statem...

...ents