Jeroen T. Vermeulen has proposed merging lp:~jtv/launchpad/bug-615673 into 
lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers): code
Related bugs:
  #615673 IPOTemplate.path says it's not required
  https://bugs.launchpad.net/bugs/615673


= 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


-- 
https://code.launchpad.net/~jtv/launchpad/bug-615673/+merge/33547
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~jtv/launchpad/bug-615673 into lp:launchpad/devel.
=== 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 @@
     path = exported(TextLine(
         title=_(
             "Path of the template in the source tree, including filename."),
-        required=False))
+        required=True))
 
     source_file = Object(
         title=_('Source file for this translation template'),

=== 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 @@
     description = StringCol(dbName='description', notNull=False, default=None)
     copyright = StringCol(dbName='copyright', notNull=False, default=None)
     datecreated = UtcDateTimeCol(dbName='datecreated', default=DEFAULT)
-    path = StringCol(dbName='path', notNull=False, default=None)
+    path = StringCol(dbName='path', notNull=True)
     source_file = ForeignKey(foreignKey='LibraryFileAlias',
         dbName='source_file', notNull=False, default=None)
     source_file_format = EnumCol(dbName='source_file_format',

_______________________________________________
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