Commit f1f11ba9 authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

Use self.fields[field] rather than self.field when iterating form fields

This way, we included the delegate field added in the
MultiplePatchForm's constructor.
Signed-off-by: default avatarJeremy Kerr <>
parent aec7cf57
......@@ -171,7 +171,8 @@ class MultiplePatchForm(PatchForm):
def __init__(self, project, *args, **kwargs):
super(MultiplePatchForm, self).__init__(project = project,
*args, **kwargs)
self.fields['delegate'] = OptionalDelegateField(project = project)
self.fields['delegate'] = OptionalDelegateField(project = project,
required = False)
def save(self, instance, commit = True):
opts = instance.__class__._meta
......@@ -184,7 +185,7 @@ class MultiplePatchForm(PatchForm):
if not in data:
field = getattr(self,, None)
field = self.fields.get(, None)
if not field:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment