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

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: c2d186531bcd4bcd51c245115cf66e991affe2ae
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:fix-stormify-potemplate
Merge into: launchpad:master
Diff against target: 27 lines (+2/-3)
2 files modified
lib/lp/translations/scripts/remove_translations.py (+1/-2)
lib/lp/translations/scripts/tests/test_remove_translations.py (+1/-1)
Reviewer Review Type Date Requested Status
Ines Almeida Approve
Review via email: mp+447427@code.launchpad.net

Commit message

Fix test failures from converting POTemplate to Storm

To post a comment you must log in.
Revision history for this message
Ines Almeida (ines-almeida) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/translations/scripts/remove_translations.py b/lib/lp/translations/scripts/remove_translations.py
2index 5864987..c042b8a 100644
3--- a/lib/lp/translations/scripts/remove_translations.py
4+++ b/lib/lp/translations/scripts/remove_translations.py
5@@ -471,8 +471,7 @@ def remove_translations(
6 " = TranslationMessage.potmsgset"
7 )
8 conditions.add(
9- "TranslationTemplateItem.potemplate = %s"
10- % sqlvalues(potemplate.id)
11+ "TranslationTemplateItem.potemplate = %s" % sqlvalues(potemplate)
12 )
13
14 if language_code is not None:
15diff --git a/lib/lp/translations/scripts/tests/test_remove_translations.py b/lib/lp/translations/scripts/tests/test_remove_translations.py
16index baf2573..15c2638 100644
17--- a/lib/lp/translations/scripts/tests/test_remove_translations.py
18+++ b/lib/lp/translations/scripts/tests/test_remove_translations.py
19@@ -676,7 +676,7 @@ class TestRemoveTranslations(TestCase):
20 ).origin = RosettaTranslationOrigin.SCM
21
22 self._removeMessages(
23- potemplate=self.potemplate, origin=RosettaTranslationOrigin.SCM
24+ potemplate=self.potemplate.id, origin=RosettaTranslationOrigin.SCM
25 )
26
27 self._checkInvariant()

Subscribers

People subscribed via source and target branches

to status/vote changes: