Commit 6dbb62e1 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Never use "not something" unless you know what it is

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11882 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3b83c9bc
...@@ -57,7 +57,7 @@ class TranslatedPropertyGetter(Method): ...@@ -57,7 +57,7 @@ class TranslatedPropertyGetter(Method):
domain = instance.getProperty('%s_translation_domain' % domain = instance.getProperty('%s_translation_domain' %
self._original_key) self._original_key)
value = instance.getProperty(self._original_key) value = instance.getProperty(self._original_key)
if domain == '' or not value: if domain == '' or (value in ('', None)):
return value return value
localizer = getToolByName(instance, 'Localizer') localizer = getToolByName(instance, 'Localizer')
return localizer[domain].gettext(unicode(value, 'utf8')).encode('utf8') return localizer[domain].gettext(unicode(value, 'utf8')).encode('utf8')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment