You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removed the insertion of 'confirm_acronym' in the active form in clean_acronym(). It triggers an exception due to changing a dictionary while the django validation code is iterating through the form fields. XXX Check if we need to put this back some other way, or if we can handle acronym re-use through the admin instead.
# # we can't set initial, it's ignored since the form is bound, instead mutate the data
150
+
# self.data = self.data.copy()
151
+
# self.data["confirm_acronym"] = initial
151
152
152
153
ifexistingandexisting.type_id==self.group_type:
153
154
ifexisting.state_id=="bof":
154
-
insert_confirm_field(label="Turn BoF %s into proposed %s and start chartering it"% (existing.acronym, existing.type.name), initial=True)
155
+
#insert_confirm_field(label="Turn BoF %s into proposed %s and start chartering it" % (existing.acronym, existing.type.name), initial=True)
155
156
ifconfirmed:
156
157
returnacronym
157
158
else:
158
-
raiseforms.ValidationError("Warning: Acronym used for an existing BoF (%s)."%existing.name)
159
+
raiseforms.ValidationError("Warning: Acronym used for an existing BoF (%s)."%existing.acronym)
159
160
else:
160
-
insert_confirm_field(label="Set state of %s %s to proposed and start chartering it"% (existing.acronym, existing.type.name), initial=False)
161
+
#insert_confirm_field(label="Set state of %s %s to proposed and start chartering it" % (existing.acronym, existing.type.name), initial=False)
161
162
ifconfirmed:
162
163
returnacronym
163
164
else:
164
-
raiseforms.ValidationError("Warning: Acronym used for an existing %s (%s, %s)."% (existing.type.name, existing.name, existing.state.nameifexisting.stateelse"unknown state"))
165
+
raiseforms.ValidationError("Warning: Acronym used for an existing %s (%s, %s)."% (existing.type.name, existing.acronym, existing.state.nameifexisting.stateelse"unknown state"))
165
166
166
167
ifexisting:
167
-
raiseforms.ValidationError("Acronym used for an existing group (%s)."%existing.name)
168
+
raiseforms.ValidationError("Acronym used for an existing group (%s)."%existing.acronym)
168
169
169
-
# TODO: Why is this limited to types wg and rg? We would want to be warned about _any_ old collision I think?
0 commit comments