fix bug in get_objects

This commit is contained in:
Laura Klünder 2018-12-26 11:57:37 +01:00
parent 1577d1df88
commit d0203006ab

View file

@ -343,8 +343,9 @@ class ChangeSet(models.Model):
except FieldDoesNotExist: except FieldDoesNotExist:
# todo: fix this # todo: fix this
continue continue
objects.setdefault(LocationSlug, {})[target.pk] = target._obj # todo: why is it sometimes wrapped and sometimes not?
objects.setdefault(target.__class__, {})[target.pk] = target._obj objects.setdefault(LocationSlug, {})[target.pk] = getattr(target, '_obj', target)
objects.setdefault(target.__class__, {})[target.pk] = getattr(target, '_obj', target)
return objects return objects