collective / pas.plugins.sqlalchemy

SQLAlchemy PAS plugin (Authentication) for Zope2/ Plone
http://plone.org/products/pas.plugins.sqlalchemy/
7 stars 7 forks source link

new principal class logic in plugin.doSetProperty fails in Plone 4.1.2 #10

Open eriklundh opened 12 years ago

eriklundh commented 12 years ago

Time Dec 14, 2011 09:29 PM User Name admin (admin) Request URL http://10.8.11.1:8080/Plone/@@new-user Exception Type AttributeError Exception Value 'NoneType' object has no attribute '_properties'

Traceback (innermost last):

Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
Module ZPublisher.Publish, line 46, in call_object
Module zope.formlib.form, line 795, in __call__
Module five.formlib.formbase, line 50, in update
Module zope.formlib.form, line 776, in update
Module zope.formlib.form, line 620, in success
Module plone.app.users.browser.register, line 539, in action_join
Module plone.app.users.browser.register, line 401, in handle_join_success
Module plone.app.users.browser.personalpreferences, line 188, in set_fullname
Module Products.PlonePAS.tools.memberdata, line 261, in setMemberProperties
Module pas.plugins.sqlalchemy.plugin, line 153, in setProperty
Module pas.plugins.sqlalchemy.plugin, line 641, in doSetProperty

AttributeError: 'NoneType' object has no attribute '_properties'

gborelli commented 12 years ago

This happens when p.p.sqlalchemy try to set properties to a user not registered on this plugin I added a check into doSetProperty method to fix this

see.: https://github.com/collective/pas.plugins.sqlalchemy/commit/f1dc5625bc0e5ee6e83eeafeb0ebce8cc12dcc02