Defect #19260

Updated by Jean-Philippe Lang over 6 years ago

Git repositories without an identifier that are not default (because another repository in the project has been promoted as default) are not deletable. This was tested on 2.3 and 2.5, but the code seems to still be in use in current trunk.

This is due to source: preventing successful saving in source: and makes the @before_destroy@ in @repository.rb@ fail.

I'm not quite sure what the intent of the validation was, I guess to enforce that if there is a repository with no identifier it is the default, but it seems possible to work around that after the creation of the identifier-less repository.

Attached is a patch with a failing test, the test passes with the validation removed, and removing the validation causes no other tests to fail.