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
=== modified file 'lib/lp/translations/interfaces/potemplate.py'
--- lib/lp/translations/interfaces/potemplate.py 2010-08-20 20:31:18 +0000
+++ lib/lp/translations/interfaces/potemplate.py 2010-08-24 16:10:37 +0000
@@ -202,7 +202,7 @@
202 path = exported(TextLine(202 path = exported(TextLine(
203 title=_(203 title=_(
204 "Path of the template in the source tree, including filename."),204 "Path of the template in the source tree, including filename."),
205 required=False))205 required=True))
206206
207 source_file = Object(207 source_file = Object(
208 title=_('Source file for this translation template'),208 title=_('Source file for this translation template'),
209209
=== modified file 'lib/lp/translations/model/potemplate.py'
--- lib/lp/translations/model/potemplate.py 2010-08-20 20:31:18 +0000
+++ lib/lp/translations/model/potemplate.py 2010-08-24 16:10:37 +0000
@@ -183,7 +183,7 @@
183 description = StringCol(dbName='description', notNull=False, default=None)183 description = StringCol(dbName='description', notNull=False, default=None)
184 copyright = StringCol(dbName='copyright', notNull=False, default=None)184 copyright = StringCol(dbName='copyright', notNull=False, default=None)
185 datecreated = UtcDateTimeCol(dbName='datecreated', default=DEFAULT)185 datecreated = UtcDateTimeCol(dbName='datecreated', default=DEFAULT)
186 path = StringCol(dbName='path', notNull=False, default=None)186 path = StringCol(dbName='path', notNull=True)
187 source_file = ForeignKey(foreignKey='LibraryFileAlias',187 source_file = ForeignKey(foreignKey='LibraryFileAlias',
188 dbName='source_file', notNull=False, default=None)188 dbName='source_file', notNull=False, default=None)
189 source_file_format = EnumCol(dbName='source_file_format',189 source_file_format = EnumCol(dbName='source_file_format',