Merge lp:~stevenk/launchpad/dsd-base_source_pub-search-parent into lp:launchpad
Proposed by
Steve Kowalik
Status: | Merged |
---|---|
Approved by: | Steve Kowalik |
Approved revision: | no longer in the source branch. |
Merged at revision: | 12592 |
Proposed branch: | lp:~stevenk/launchpad/dsd-base_source_pub-search-parent |
Merge into: | lp:launchpad |
Diff against target: |
113 lines (+48/-11) 3 files modified
lib/lp/registry/interfaces/distroseriesdifference.py (+2/-1) lib/lp/registry/model/distroseriesdifference.py (+11/-8) lib/lp/registry/tests/test_distroseriesdifference.py (+35/-2) |
To merge this branch: | bzr merge lp:~stevenk/launchpad/dsd-base_source_pub-search-parent |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Henning Eggers (community) | code | Approve | |
Review via email: mp+53194@code.launchpad.net |
Commit message
[r=henninge][bug=734719] DSD.base_source_pub now looks in the parent series first, and then the child distroseries.
Description of the change
DSD.base_source_pub should look in the parent series first, since that is most likely to contain the base version publication in the real world.
To post a comment you must log in.
This does two queries always - the count() (expensive) and then a first.
Better to just do a first:
result = pubs.first()
if result is None:
result = ... other side query ... .first()
return result