Merge lp:~jtv/launchpad/bug-615673 into lp:launchpad

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 11432
Proposed branch: lp:~jtv/launchpad/bug-615673
Merge into: lp:launchpad
Diff against target: 25 lines (+2/-2)
2 files modified
lib/lp/translations/interfaces/potemplate.py (+1/-1)
lib/lp/translations/model/potemplate.py (+1/-1)
To merge this branch: bzr merge lp:~jtv/launchpad/bug-615673
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+33547@code.launchpad.net

Commit message

Make POTemplate.path required.

Description of the change

= Bug 615673 =

For some reason, POTemplate.path and IPOTemplate.path are marked as not required. That's nonsense. POTemplates are always created with a path. There is a database constraint requiring the path. Even the parameter to the factory method is required. Everything assumes it's there.

Here's a branch I never spent any time on; I just made the field required and sent the whole thing off to EC2. It just got back to me to say that the change is no problem at all. Might as well make it permanent.

To test, er, run all tests. That's what I did. And to Q/A, see that nothing breaks. If something does, chances are it's still a bug that this was just covering up for.

Jeroen

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/translations/interfaces/potemplate.py'
2--- lib/lp/translations/interfaces/potemplate.py 2010-08-20 20:31:18 +0000
3+++ lib/lp/translations/interfaces/potemplate.py 2010-08-24 16:10:37 +0000
4@@ -202,7 +202,7 @@
5 path = exported(TextLine(
6 title=_(
7 "Path of the template in the source tree, including filename."),
8- required=False))
9+ required=True))
10
11 source_file = Object(
12 title=_('Source file for this translation template'),
13
14=== modified file 'lib/lp/translations/model/potemplate.py'
15--- lib/lp/translations/model/potemplate.py 2010-08-20 20:31:18 +0000
16+++ lib/lp/translations/model/potemplate.py 2010-08-24 16:10:37 +0000
17@@ -183,7 +183,7 @@
18 description = StringCol(dbName='description', notNull=False, default=None)
19 copyright = StringCol(dbName='copyright', notNull=False, default=None)
20 datecreated = UtcDateTimeCol(dbName='datecreated', default=DEFAULT)
21- path = StringCol(dbName='path', notNull=False, default=None)
22+ path = StringCol(dbName='path', notNull=True)
23 source_file = ForeignKey(foreignKey='LibraryFileAlias',
24 dbName='source_file', notNull=False, default=None)
25 source_file_format = EnumCol(dbName='source_file_format',