EMAIL and OPENID fields are not unique as we store empty values there, fixes #185
authorThomas Waldmann <tw AT waldmann-edv DOT de>
Sat, 09 Jun 2012 18:35:13 +0200
changeset 1369e34b627881e4
parent 1368 f369d028cb15
child 1370 cd42e6133f5f
EMAIL and OPENID fields are not unique as we store empty values there, fixes #185
MoinMoin/storage/middleware/indexing.py
     1.1 --- a/MoinMoin/storage/middleware/indexing.py	Sat Jun 09 18:23:20 2012 +0200
     1.2 +++ b/MoinMoin/storage/middleware/indexing.py	Sat Jun 09 18:35:13 2012 +0200
     1.3 @@ -260,8 +260,12 @@
     1.4          latest_revs_fields.update(**common_fields)
     1.5  
     1.6          userprofile_fields = {
     1.7 -            EMAIL: ID(unique=True, stored=True),
     1.8 -            OPENID: ID(unique=True, stored=True),
     1.9 +            # Note: email / openid (if given) should be unique, but we might
    1.10 +            # have lots of empty values if it is not given and thus it is NOT
    1.11 +            # unique overall! Wrongly declaring it unique would lead to whoosh
    1.12 +            # killing other users from index when update_document() is called!
    1.13 +            EMAIL: ID(stored=True),
    1.14 +            OPENID: ID(stored=True),
    1.15          }
    1.16          latest_revs_fields.update(**userprofile_fields)
    1.17