OSU-Net / cyder

Cyder
BSD 3-Clause "New" or "Revised" License
10 stars 12 forks source link

Removing range from ctnr results in error #1031

Closed akeym closed 9 years ago

akeym commented 9 years ago

ERROR:django.request:Internal Server Error: /core/ctnr/1/remove_object/ Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response response = callback(request, _callback_args, _callback_kwargs) File "/home/akeym/Repo/cyder/cyder/core/ctnr/views.py", line 264, in remove_object m2m.remove(obj) File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/related.py", line 586, in remove self._remove_items(self.source_field_name, self.target_field_name, _objs) File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/related.py", line 694, in _remove_items model=self.model, pk_set=old_ids, using=db) File "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 172, in send response = receiver(signal=self, sender=sender, _named) File "/home/akeym/Repo/cyder/cyder/core/ctnr/models.py", line 181, in ranges_changed objects_removed(ctnr, ranges, objtype="range") File "/home/akeym/Repo/cyder/cyder/core/ctnr/models.py", line 153, in objects_removed results = [p for p in results if p.range == obj] TypeError: 'Manager' object is not iterable