Add conditional for soft deletes in Repository::delete