Skip to content

Commit

Permalink
Made translation lookup more tollarant, however not sure about the co…
Browse files Browse the repository at this point in the history
…rrectness
  • Loading branch information
Bo Simonsen committed Jan 14, 2013
1 parent e7e94cf commit 88116e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/collective/multilingual/graph.py
Expand Up @@ -107,6 +107,11 @@ def getCanonicalContent(self, cache):

if not IMultilingual.providedBy(obj):
logger.warn("integrity error; parent not translation-aware.")
return

if not ITranslationGraph.providedBy(obj):
logger.warn("Object is not providing translation graph.")
return

obj = ITranslationGraph(obj).getCanonicalContent()
return cache.set(obj, str(IUUID(obj)))
Expand Down

0 comments on commit 88116e5

Please sign in to comment.