Deepomatic / deepomatic-client-python

Python Client
Other
14 stars 0 forks source link

Task.batch_wait() should return the same Task objects #70

Open thomas-riccardi opened 4 years ago

thomas-riccardi commented 4 years ago

Currently Task.batch_wait() returns newly created Task objects (because it goes through ListableResource.list() which exclusively takes pk as argument (and recreates new objects).

I would have expected that my initial Task objects would be directly refreshed by batch_wait().

Solution: make ListableResource.list() also accept class objects, in addition to the current pk, and use that in batch_wait().

This would be a breaking change but that's OK.