Skip to content

Commit

Permalink
Merge pull request #669 from upconsulting/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jdamerow authored Nov 26, 2020
2 parents c28e3f5 + 95c470e commit e3f9f71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion isiscb/curation/taskslib/authority_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ def update_elements(file_path, error_path, task_id, user_id):
field_to_change, new_value = _find_value(field_to_change, new_value, element)

# check if field to change is a ManyToManyField (IEXP-232)
if isinstance(element.__class__.__dict__[field_to_change], models.fields.related_descriptors.ManyToManyDescriptor):
# if class is a subclass, this won't work, but we only have Person so far that Subclasses
# Authority, which doesn't have any many to many relationships
if field_to_change in element.__class__.__dict__ and isinstance(element.__class__.__dict__[field_to_change], models.fields.related_descriptors.ManyToManyDescriptor):
# all this is really ugly, but we have to store the old list for the
# administrator notes
old_value = element.__getattribute__(field_to_change).all()
Expand Down

0 comments on commit e3f9f71

Please sign in to comment.