Skip to content

subscribe_notes ignored in unicode-sensitive comparison #1118

@janfabry

Description

@janfabry

I have disabled subscribe_notes, but I still get notifications of new notes. I think this is due to a Unicode-aware comparison.

>>> UserOption.objects.filter(key='subscribe_notes', value='0')
[]
>>> UserOption.objects.filter(key='subscribe_notes', value=u'0')
[<UserOption at 0x4505110: id=73, user_id=1, project_id=None, key=u'subscribe_notes', value=u'0'>, <UserOption at 0x4505190: id=137, user_id=2, project_id=None, key=u'subscribe_notes', value=u'0'>]

Activity.send_notification compares with '0', and thus never returns me as a user to exclude.

Python 2.7.3, Postgres 9.2.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions