lundi 20 septembre 2021

Firestore do not create

I am writing a Python code connected to Cloud Firestore. I want my code to skip and not create a document if the document's id is 1

if docid == 1:
    # do not create document

else:
   db.collection(u'collection_of_work').document(docid).set(data)

How to "not create" a document?

Aucun commentaire:

Enregistrer un commentaire