Skip to content

Commit b332233

Browse files
committed
Fixed a problem with the handling of multiple registrations for the same person and meeting in api_new_meeting_registration().
- Legacy-Id: 18059
1 parent a827c48 commit b332233

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

ietf/api/views.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,13 @@ def err(code, text):
165165
for key in set(data.keys())-set(['attended', 'apikey', 'meeting', 'email',]):
166166
new = data.get(key)
167167
cur = getattr(object, key, None)
168-
if key in ['reg_type', 'ticket_type', ] and cur and not new in cur:
168+
if key in ['reg_type', 'ticket_type', ] and new:
169169
# Special handling for multiple reg types
170-
setattr(object, key, cur+' '+new)
170+
if cur:
171+
if not new in cur:
172+
setattr(object, key, cur+' '+new)
173+
else:
174+
setattr(object, key, new)
171175
else:
172176
setattr(object, key, new)
173177
person = Person.objects.filter(email__address=email)

0 commit comments

Comments
 (0)