mirror of https://github.com/MISP/PyMISP
chg: Some more code cleanup
parent
5286462361
commit
89a24d4923
|
@ -363,12 +363,12 @@ class ExpandedPyMISP(PyMISP):
|
|||
if 'errors' in new_attribute:
|
||||
to_return['errors'] = new_attribute['errors']
|
||||
|
||||
for attribute in new_attribute['Attribute']:
|
||||
for new_attr in new_attribute['Attribute']:
|
||||
a = MISPAttribute()
|
||||
a.from_dict(**attribute)
|
||||
to_return['attributes'].append(a)
|
||||
return to_return
|
||||
else:
|
||||
|
||||
if ('errors' in new_attribute and new_attribute['errors'][0] == 403
|
||||
and new_attribute['errors'][1]['message'] == 'You do not have permission to do that.'):
|
||||
# At this point, we assume the user tried to add an attribute on an event they don't own
|
||||
|
|
Loading…
Reference in New Issue