From bac5792e516a78714cc629cd9defa8c269653d63 Mon Sep 17 00:00:00 2001 From: helmutm Date: Tue, 10 Feb 2009 15:08:40 +0000 Subject: [PATCH] record newly created resources in adapter for further use by calling view git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3224 fd906abe-77d9-0310-91a1-e0d9ade77398 --- integrator/collection.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/integrator/collection.py b/integrator/collection.py index 880dcda..51fae5e 100644 --- a/integrator/collection.py +++ b/integrator/collection.py @@ -59,9 +59,11 @@ class ExternalCollectionAdapter(AdapterBase): implements(IExternalCollection) adapts(IConcept) - _adapterAttributes = ('context', '__parent__', 'exclude') + _adapterAttributes = ('context', '__parent__', 'exclude', 'newResources') _contextAttributes = list(IExternalCollection) + list(IConcept) + newResources = None + def getExclude(self): return getattr(self.context, '_exclude', None) or [] def setExclude(self, value): @@ -87,8 +89,8 @@ class ExternalCollectionAdapter(AdapterBase): else: new.append(addr) if new: - newResources = provider.createExtFileObjects(self, new) - for r in newResources: + self.newResources = provider.createExtFileObjects(self, new) + for r in self.newResources: self.context.assignResource(r) for addr in old: if addr not in oldFound: