Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incoherence when using getattr in a field ObjPathSourceBinder #30

Open
idgserpro opened this issue Nov 16, 2016 · 0 comments
Open

Incoherence when using getattr in a field ObjPathSourceBinder #30

idgserpro opened this issue Nov 16, 2016 · 0 comments

Comments

@idgserpro
Copy link

When I have a field ObjPathSourceBinder:

from plone.formwidget.contenttree import ObjPathSourceBinder
...

class ICarrossel(Interface):

    product = RelationChoice(
        title=_(u'Product'),
        source=ObjPathSourceBinder(object_provides=IProduct.__identifier__),
        required=False,
    )

When I create a Carrossel object that has never had the produtct field populated:

>>>print getattr(carrossel, 'product')
None

When I fill the product field, I then delete the product:

>>>print getattr(carrossel, 'product')
<z3c.relationfield.relation.RelationValue object at 0xb1289bac>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant