Code

Ticket #3788: fields_multivaluefield.patch

File fields_multivaluefield.patch, 513 bytes (added by Max Derkachev <mderk@…>, 7 years ago)
  • fields.py

     
    455455        for i, field in enumerate(self.fields): 
    456456            try: 
    457457                field_value = value[i] 
    458             except KeyError: 
     458            except IndexError: 
    459459                field_value = None 
    460460            if self.required and field_value in EMPTY_VALUES: 
    461461                raise ValidationError(gettext(u'This field is required.'))