make migrateStorage() more tolerant: no migration when no adapter found

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1706 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2007-05-01 09:05:41 +00:00
parent fd05478f71
commit 5369eb78ad

View file

@ -227,7 +227,9 @@ class Resource(Image, Contained):
oldAdapted = newAdapted = context
oldTi = removeSecurityProxy(oldType.typeInterface)
if oldTi is not None:
oldAdapted = oldTi(context)
oldAdapted = oldTi(context, None)
if oldAdapted is None: # nothing to migrate
return
newTi = removeSecurityProxy(newType.typeInterface)
newOptions = {}
if newTi is not None: