[Erp5-users] BUG in IMPORT [solved] - extension
Tomasz Brzezina
tomasz at brzezina.pl
Thu Nov 23 09:19:46 CET 2006
Tomasz Brzezina napisał(a):
> There is a bug in /erp5/portal_skins/erp5_core/Base_importCsvLine
>
> IS:
> object = context.portal_catalog.getObject(object_property_dict['uid'])
>
> if object == None:
> object = context.newContent()
> (...)
>
> SHOULD BE:
> if object_property_dict.has_key('uid'):
> object = context.portal_catalog.getObject(object_property_dict['uid'])
> else:
> object = context.newContent()
>
> (...)
>
It's possible that someone will enter some 'uid' into csv and then it
will put incorrect results. I think it should be rather
if object_property_dict.has_key('uid'):
object = context.portal_catalog.getObject(object_property_dict['uid'])
else:
object = None
if object == None:
object = context.newContent()
--
Tomasz Brzezina
More information about the Erp5-users
mailing list