[api] ensure existins of "deleted" project and repository on update