accept empty 'lastUpdated', set storageParameters on update

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3988 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2010-09-09 13:33:20 +00:00
parent 31051a94ed
commit e20e35c4fd

View file

@ -95,10 +95,13 @@ class ExternalCollectionAdapter(AdapterBase):
# may be it would be better to return a file's hash
# for checking for changes...
oldFound.append(addr)
if mdate and mdate > self.lastUpdated:
if self.lastUpdated is None or (mdate and mdate > self.lastUpdated):
obj = old[addr]
# regenerate scale variant for media asset
adapted(obj).externalAddress = addr
# update settings and regenerate scale variant for media asset
adobj = adapted(obj)
directory = provider.getDirectory(self)
adobj.storageParams=dict(subdirectory=directory)
adobj.externalAddress = addr
# force reindexing
notify(ObjectModifiedEvent(obj))
else: