Skip to content

Commit d07411c

Browse files
committed
Fixed an issue which could arise when updating IPR declarations with no value for patent_info.
- Legacy-Id: 14638
1 parent 534b889 commit d07411c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/ipr/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,11 @@ def new(request, type, updates=None):
535535
original = IprDisclosureBase(id=updates).get_child()
536536
initial = model_to_dict(original)
537537
initial.update({'updates':str(updates), })
538-
patent_info = text_to_dict(initial['patent_info'])
538+
patent_info = text_to_dict(initial.get('patent_info', u''))
539539
if patent_info.keys():
540540
patent_dict = dict([ ('patent_'+k.lower(), v) for k,v in patent_info.items() ])
541541
else:
542-
patent_dict = {'patent_notes': initial['patent_info']}
542+
patent_dict = {'patent_notes': initial.get('patent_info', u'')}
543543
initial.update(patent_dict)
544544
form = ipr_form_mapping[type](initial=initial)
545545
else:

0 commit comments

Comments
 (0)