collective / pas.plugins.sqlalchemy

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

TypeError when model.Group.__repr__ is called. #14

Closed rudaporto closed 12 years ago

rudaporto commented 12 years ago

I think model.py has a typo on line 186:

(Pdb) ("<Group id=%d name=%s>" % (str(self.id), self.zope_id)).encode('utf-8')
*** TypeError: %d format: a number is required, not str

But tha way works fine:

(Pdb) ("<Group id=%s name=%s>" % (str(self.id), self.zope_id)).encode('utf-8')
'<Group id=10 name=SiteAdministrators>'

If someone give access I can push this typo. :-)

malthe commented 12 years ago

You need to join the collective community here on Github – then you'll automatically have read / write access to this repository.

See http://collective.github.com/.

Thanks!

rudaporto commented 12 years ago

I include myself as a collective contributor and sent a pull request. ;-)

jean commented 12 years ago

Another way around would be to keep %d and change str(self.id) to self.id --- if self.id will always be an integer.

rudaporto commented 12 years ago

Jean, I follow the pattern used on all other model classes. :-)

rudaporto commented 12 years ago

Fixed at SHA: fe345cc09d71a703bd83a538e03dbff6f91a5bc5