Context
I would like to fetch some data from Firestore that way:
query = db.collection("users").where("age", ">", 20)
for document in query.stream():
print("User id: {}".format(document.id))
However, I cannot assert whether it will iterate over documents. Indeed, if no documents match with my where condition, nothing happens. I would like to raise an Exception instead.
Question
How can we catch any empty QuerySnapshot with the python API ?
Resources: Firebase documentation