I'm working on a query in Python to get the list of documents (documents of collections) from a Firestore database. I know it's a really simple query, but I can't get the list of documents
cred = credentials.Certificate('keys.json')
firebase_admin.initialize_app(cred)
db = firestore.client()
answer = (db.collection("chat").get())
for i in answer:
print(f'{i.id} => {i.to_dict()}')
print(len(answer))
I´m able to work this query
answer2 =(db.collection("chat/company/FkLxckrD2TgGGXLghUI8hy1irH93").get())
for i in answer2:
print(f'{i.id} => {i.to_dict()}')
The second query gets all the information correctly, but the first one does not work. In the first one I want to get the documents in this example is the one with a blue square
Here is the structure of the Firebase.
Thanks
In the last photo I created a document manually with the same structure as the first one, I´m able to get this one, but not the first.