Fix ActiveRecord issue that causes a project to have no primary image