=== modified file 'lib/lp/registry/browser/tests/test_product.py'
--- lib/lp/registry/browser/tests/test_product.py 2015-10-01 17:32:41 +0000
+++ lib/lp/registry/browser/tests/test_product.py 2015-12-17 01:01:43 +0000
@@ -748,6 +748,14 @@
view.render()
self.assertThat(recorder, HasQueryCount(LessThan(26)))
+ def test_reset_oddity(self):
+ from lp.registry.model.milestone import Milestone
+ product = Product.get(1)
+ series = product.development_focus
+ Milestone(product=product, productseries=series, name=u'foo')
+ removeSecurityProxy(product).access_policies = [1]
+ IStore(Product).reset()
+
class TestProductRdfView(BrowserTestCase):
"""Test the Product RDF view."""
=== modified file 'lib/lp/registry/model/product.py'
--- lib/lp/registry/model/product.py 2015-10-01 17:32:41 +0000
+++ lib/lp/registry/model/product.py 2015-12-17 00:37:36 +0000
@@ -47,6 +47,7 @@
Store,
Unicode,
)
+from storm.properties import Int, List
from zope.component import getUtility
from zope.event import notify
from zope.interface import (
@@ -435,6 +436,8 @@
name='remote_product', allow_none=True, default=None)
vcs = EnumCol(enum=VCSType, notNull=False)
+ access_policies = List(type=Int())
+
@property
def displayname(self):
return self.display_name