From e2d01962c115b2376dc588d1ccd72f024e551cc0 Mon Sep 17 00:00:00 2001 From: helmutm Date: Tue, 15 Dec 2009 09:16:40 +0000 Subject: [PATCH] force regeneration of media asset scale variants when it seems to have changed git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3655 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 4203fe7..5c85228 100644 --- a/integrator/collection.py +++ b/integrator/collection.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2007 Helmut Merz helmutm@cy55.de +# Copyright (c) 2009 Helmut Merz helmutm@cy55.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -73,7 +73,6 @@ class ExternalCollectionAdapter(AdapterBase): def update(self): existing = self.context.getResources() - #old = dict((adapted(obj).uniqueAddress, obj) for obj in existing) old = dict((adapted(obj).externalAddress, obj) for obj in existing) new = [] oldFound = [] @@ -85,8 +84,11 @@ class ExternalCollectionAdapter(AdapterBase): # for checking for changes... oldFound.append(addr) if mdate and mdate > self.lastUpdated: + obj = old[addr] + # regenerate scale variant for media asset + adapted(obj).externalAddress = addr # force reindexing - notify(ObjectModifiedEvent(old[addr])) + notify(ObjectModifiedEvent(obj)) else: new.append(addr) if new: