← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:fix-stormify-potemplate into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:fix-stormify-potemplate into launchpad:master.

Commit message:
Fix test failures from converting POTemplate to Storm

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/447427
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:fix-stormify-potemplate into launchpad:master.
diff --git a/lib/lp/translations/scripts/remove_translations.py b/lib/lp/translations/scripts/remove_translations.py
index 5864987..c042b8a 100644
--- a/lib/lp/translations/scripts/remove_translations.py
+++ b/lib/lp/translations/scripts/remove_translations.py
@@ -471,8 +471,7 @@ def remove_translations(
             " = TranslationMessage.potmsgset"
         )
         conditions.add(
-            "TranslationTemplateItem.potemplate = %s"
-            % sqlvalues(potemplate.id)
+            "TranslationTemplateItem.potemplate = %s" % sqlvalues(potemplate)
         )
 
     if language_code is not None:
diff --git a/lib/lp/translations/scripts/tests/test_remove_translations.py b/lib/lp/translations/scripts/tests/test_remove_translations.py
index baf2573..15c2638 100644
--- a/lib/lp/translations/scripts/tests/test_remove_translations.py
+++ b/lib/lp/translations/scripts/tests/test_remove_translations.py
@@ -676,7 +676,7 @@ class TestRemoveTranslations(TestCase):
         ).origin = RosettaTranslationOrigin.SCM
 
         self._removeMessages(
-            potemplate=self.potemplate, origin=RosettaTranslationOrigin.SCM
+            potemplate=self.potemplate.id, origin=RosettaTranslationOrigin.SCM
         )
 
         self._checkInvariant()