Fixed add photo crash when cancel; Add simple db rest query test tool