Skip to content

Commit f99fa39

Browse files
committed
Make PersonOrOrgInfo unique=True again. Various things assume
that within auth_users, the email address is unique, so let's not break those assumptions. - Legacy-Id: 617
1 parent 306bece commit f99fa39

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

ietf/ietfauth/models.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44

55
class UserMap(models.Model):
66
"""
7-
This is effectively a many:1 mapping of django-user -> IETF user.
8-
It'd ideally be 1:1, but for testing some users have multiple
9-
accounts with different privilege levels.
7+
This is a 1:1 mapping of django-user -> IETF user.
8+
This can't represent the users in the existing tool that
9+
have multiple accounts with multiple privilege levels: they
10+
need extra IETF users.
1011
"""
1112
user = models.ForeignKey(User, raw_id_admin=True, core=True, unique=True)
12-
person = models.ForeignKey(PersonOrOrgInfo, edit_inline=models.STACKED, max_num_in_admin=1)
13+
person = models.ForeignKey(PersonOrOrgInfo, edit_inline=models.STACKED, max_num_in_admin=1, unique=True)
1314
def __str__(self):
1415
return "Mapping django user %s to IETF person %s" % ( self.user, self.person )
1516

0 commit comments

Comments
 (0)