William Grant has proposed merging lp:~wgrant/launchpad/better-ttb-urls into 
lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/better-ttb-urls/+merge/60016

TranslationTemplateBuilds currently use BuildFarmJob.id in their URLs. 
BuildFarmJob.id is going away, so they should use TranslationTemplatesBuild.id 
instead.

These URLs are not linked to from anywhere, so no compatibility is required.
-- 
https://code.launchpad.net/~wgrant/launchpad/better-ttb-urls/+merge/60016
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~wgrant/launchpad/better-ttb-urls into lp:launchpad.
=== modified file 'lib/lp/code/browser/branch.py'
--- lib/lp/code/browser/branch.py	2011-05-04 03:32:06 +0000
+++ lib/lp/code/browser/branch.py	2011-05-05 05:34:25 +0000
@@ -252,13 +252,11 @@
     def traverse_translation_templates_build(self, id_string):
         """Traverses to a `TranslationTemplatesBuild`."""
         try:
-            buildfarmjob_id = int(id_string)
+            ttbj_id = int(id_string)
         except ValueError:
             raise NotFoundError(id_string)
         source = getUtility(ITranslationTemplatesBuildSource)
-        buildfarmjob = getUtility(IBuildFarmJobSet).getByID(
-            buildfarmjob_id)
-        return source.getByBuildFarmJob(buildfarmjob)
+        return source.getByID(ttbj_id)
 
 
 class BranchEditMenu(NavigationMenu):

=== modified file 'lib/lp/translations/browser/configure.zcml'
--- lib/lp/translations/browser/configure.zcml	2011-03-31 19:42:48 +0000
+++ lib/lp/translations/browser/configure.zcml	2011-05-05 05:34:25 +0000
@@ -1058,7 +1058,7 @@
         name="+index"/>
     <browser:url
         for="lp.translations.interfaces.translationtemplatesbuild.ITranslationTemplatesBuild"
-        path_expression="string:+translation-templates-build/${build_farm_job/id}"
+        path_expression="string:+translation-templates-build/${id}"
         attribute_to_parent="branch"/>
     <browser:page
         for="lp.translations.interfaces.translationtemplatesbuild.ITranslationTemplatesBuild"

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to