Skip to content

'in' implementation for ForeignLists does not handle None #110

Description

@sloria

Given a model with the field:

    logs = fields.ForeignField('nodelog', list=True, backref='logged')

The in operator doesn't return the correct value if None is in the list.

node.logs # => [<NodeLog...>, None]
None in node.logs # => False

The problem seems to lie in the __contains__ implementation of ForeignLists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions