Closed mstajdohar closed 7 years ago
Removing data from collections by slug does not work. It does work if data object is specified by its ID.
Error:
ResloweServerError: ValueError at /api/collection/2/remove_data invalid literal for int() with base 10: 'hg19'
Fails for:
In [10]: c.remove_data('data-11') --------------------------------------------------------------------------- ResloweServerError Traceback (most recent call last) <ipython-input-10-798cccd2ab41> in <module>() ----> 1 c.remove_data('data-11') /Users/janez/resolwe-bio-py/resdk/resources/collection.pyc in remove_data(self, *data) 57 """Remove ``data`` objects from the collection.""" 58 data = [get_data_id(d) for d in data] ---> 59 self.api(self.id).remove_data.post({'ids': data}) 60 self._clear_data_cache() 61 /Users/janez/resolwe-bio-py/resdk/exceptions.pyc in wrapper(*args, **kwargs) 33 return func(*args, **kwargs) 34 except SlumberHttpBaseException as exception: ---> 35 raise ResloweServerError(exception.content) # pylint: disable=no-member 36 37 return wrapper ResloweServerError: <h1>Server Error (500)</h1>
@dblenkus What is the status of this?
It was agreed that this functions should work by id or actual data object. I can probably add slug quite easy, but it should be planned before.
Not needed.
Removing data from collections by slug does not work. It does work if data object is specified by its ID.
Error:
ResloweServerError: ValueError at /api/collection/2/remove_data invalid literal for int() with base 10: 'hg19'
Fails for: