Merge lp://staging/~rockstar/launchpad/sourcepackagerecipe-name-contstraint into lp://staging/launchpad
Proposed by
Paul Hummer
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Paul Hummer | ||||
Proposed branch: | lp://staging/~rockstar/launchpad/sourcepackagerecipe-name-contstraint | ||||
Merge into: | lp://staging/launchpad | ||||
Diff against target: |
176 lines (+79/-7) 4 files modified
lib/lp/code/errors.py (+5/-0) lib/lp/code/model/sourcepackagerecipe.py (+36/-4) lib/lp/code/model/tests/test_sourcepackagerecipe.py (+35/-0) lib/lp/registry/model/person.py (+3/-3) |
||||
To merge this branch: | bzr merge lp://staging/~rockstar/launchpad/sourcepackagerecipe-name-contstraint | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stuart Bishop (community) | Disapprove | ||
Review via email: mp+26122@code.staging.launchpad.net |
Description of the change
This branch ensures that a person cannot own two recipes owned by the same person. There's a db patch for this as well, but Aaron and I have decided that we also need to enforce this in the model. The followup to this branch is making sure this is dealt with in the UI, but we need to get this branch landed soon to make sure edge is prevented from having this problem.
To post a comment you must log in.
UI code should ensure that invalid values are never passed through, as that will generate an OOPS.
Database constraints exist to catch things that slip through and generate the OOPS.
Guards at this level are unnecessary and wasteful, just duplicating the functionality of the db constraint.