Fix in case of settings doesn't have CUSTOM_PHOTO_MODEL defined.