Help me with my Firebase/Python Script

Job ID: 32139831

Budget: $15 – $25 USD

Hello. I have a script that doesn't seem to always work as intended, and I can't figure out why.

I've attached it here. The core essence of it, is that it should do the following:

1. Loop through Firestore collection
2. Create JSON of the collection (it should go one level deep to keys which are mapped to other collections..)
3. Upload it to Cloud Storage.

It is generally working, but for some reason, for some apps it doesn't send all of the data, or it goes a level deep into a collection when it shouldn't and I can't figure out why. I've attached the python here

I can give you access to my Firestore as well.