Adjust project namespace presence validation on update
What does this MR do and why?
Fixes the case of project update when a project does not have an associated project namespace when FF is enabled. This also ensures that if a project already has a project namespace associated with it, it cannot be easily removed.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
- Make sure the FF is enabled globally
Feature.enable(:create_project_namespace_on_project_create)
- Navigate to a project that does not yet have an associated project namespace
- Try to enable/disable issues on project settings page.
Observed
- project is not being save because of the validation error about project namespace being blank.
Expected
- project should be saved and no validation error should be show in the case when project did not have an associated project namespace in the first place.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Alexandru Croitor