octabytes / FireO

Google Cloud Firestore modern and simplest convenient ORM package in Python. FireO is specifically designed for the Google's Firestore
https://fireo.octabyte.io
Apache License 2.0
247 stars 29 forks source link

List Field wont update / Save #216

Closed codevoyager42 closed 9 months ago

codevoyager42 commented 9 months ago

I am new to the lib, and maybe I am doing something worng. However I am unable to update or save a ListField on a model I have queried, but am able to change other properties at the same time and the work as exepected.

Eg.

email_model = EmailModel.collection.get(email_id)
email_model.list_field_to_update = ["asdfasdfasdfasdf"]
email_model.save() 

Model:

class EmailModel(AbstractModel):
    list_field_to_update = ListField(
        TextField(),
    )

calling to_dict() also does not include the list field. However accessing it with email_model.list_field_to_update will give the correct result

I have read, docs and the tests, but cant see what I doing wrong

codevoyager42 commented 9 months ago

Nevermind i had a , which made it a tuple - as you were.