GetStream / stream-python

Python Client - Build Activity Feeds & Streams with GetStream.io
https://getstream.io
BSD 3-Clause "New" or "Revised" License
141 stars 41 forks source link

Cannot control the reference id of collection entry #125

Closed tuan-nng closed 4 years ago

tuan-nng commented 4 years ago

Problem explanation

add an entry to collection with specified id, collection entry should be created with that id.

Steps to reproduce

stored_data = stream_client.collections.add(collection_name="name", data=data,
                                                      id="ABC")
stored_data
{'duration': '4.08ms', 'id': 'd1dab993-a5f2-4c2d-b8e8-b670204f95c2', 'collection': 'name',...}

I expect that stored_data['id'] = 'ABC'

gz#5609

shodgetts commented 4 years ago

Agent comment from Stephen Hodgetts in Zendesk ticket #5609:

Thanks for the report

tuan-nng commented 4 years ago

I just realized that I passed the id as an object, not an actual string "ABC". (example code is simplified). I tested again and it worked.