vaphes / pocketbase

PocketBase client SDK for python
https://pypi.org/project/pocketbase/
MIT License
332 stars 38 forks source link

Client Deserializes Record Values to `collection_id` Attribute #37

Closed Dan6erbond closed 1 year ago

Dan6erbond commented 1 year ago

I'm trying to fetch a record with a file, so I can use the client.get_file_url() method on it. I immediately noticed in the debugger, that all the record's values are being deserialized to collection_id which is most likely an error.

image

My code:

    record = client.collection("files").get_one(file_id)
    url = client.get_file_url(record, record.collection_id["file"], {})
abyesilyurt commented 1 year ago

Fixed in #42, please test in master.

stratosgear commented 1 year ago

I've also commented in the MR too, but here might make more sense. Sorry for duplicate message :(

Fix works for me.

When can we expect a release? This is a major broken release that is out there now!

Thanks, btw!!!