[Zope-CMF] problem in setting local roles for newly created object

Dieter Maurer dieter at handshake.de
Sat Apr 1 04:27:05 EST 2006


Bartek Gorny wrote at 2006-3-29 11:50 +0200:
> ...
>I have a script which creates a new instance of a certain portal_type
>by a method "constructContent", and then calls manage_setLocalRoles.
>And I get an exception:
>
>Module AccessControl.Role, line 362, in manage_setLocalRoles
>AttributeError: __hash__
>
>and the lines in question are:
>361        dict=self.__ac_local_roles__ or {}
>362        dict[userid]=roles

This means, the "userid" does not have a "__hash__" method
and especially is not as string. But, it should be a string!

-- 
Dieter


More information about the Zope-CMF mailing list