launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #02937
Re: [Merge] lp:~stevenk/launchpad/dsd-base_source_pub-search-parent into lp:launchpad
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
--
https://code.launchpad.net/~stevenk/launchpad/dsd-base_source_pub-search-parent/+merge/53194
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/dsd-base_source_pub-search-parent into lp:launchpad.
References