← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:stormify-distroseriesdifference-more into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:stormify-distroseriesdifference-more into launchpad:master.

Commit message:
Fix some stray SQLObject-style bits in DistroSeriesDifference

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/451689
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:stormify-distroseriesdifference-more into launchpad:master.
diff --git a/lib/lp/registry/model/distroseriesdifference.py b/lib/lp/registry/model/distroseriesdifference.py
index e82e975..e367a69 100644
--- a/lib/lp/registry/model/distroseriesdifference.py
+++ b/lib/lp/registry/model/distroseriesdifference.py
@@ -15,7 +15,7 @@ import apt_pkg
 from debian.changelog import Changelog, Version
 from lazr.enum import DBItem
 from storm.expr import And, Cast, Column, Desc, Or, Select, Table
-from storm.locals import Int, Reference
+from storm.locals import Int, Reference, Unicode
 from storm.zope.interfaces import IResultSet
 from zope.component import getUtility
 from zope.interface import implementer, provider
@@ -48,7 +48,6 @@ from lp.services.database import bulk
 from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.database.enumcol import DBEnum
 from lp.services.database.interfaces import IPrimaryStore, IStore
-from lp.services.database.sqlobject import StringCol
 from lp.services.database.stormbase import StormBase
 from lp.services.messages.model.message import Message, MessageChunk
 from lp.services.propertycache import (
@@ -389,11 +388,11 @@ class DistroSeriesDifference(StormBase):
         allow_none=False,
         enum=DistroSeriesDifferenceType,
     )
-    source_version = StringCol(dbName="source_version", notNull=False)
-    parent_source_version = StringCol(
-        dbName="parent_source_version", notNull=False
+    source_version = Unicode(name="source_version", allow_none=True)
+    parent_source_version = Unicode(
+        name="parent_source_version", allow_none=True
     )
-    base_version = StringCol(dbName="base_version", notNull=False)
+    base_version = Unicode(name="base_version", allow_none=True)
 
     @staticmethod
     def new(derived_series, source_package_name, parent_series):