You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to run function after I create or retrieve object from firestore. Let's say...
class A(models.Model):
firestore_1 = models.TextField()
Let's say I retrieve instance of A from firestore via get_by_id() or fetch() which set firestore_1 to "xxx" or "yyy" then I want it initialize context base on data in firestore_1 (after retrieved)
I try to do the following
class A(models.Model):
def __init__(self):
super().__init__()
self.context = Context(self.firestore_1)
However, I found out that when I get data from firestore self.context run before firestore_1 has been set
I can't find the way to automatic run code after instance has finish created with value. Please advise
The text was updated successfully, but these errors were encountered:
I would like to run function after I create or retrieve object from firestore. Let's say...
Let's say I retrieve instance of A from firestore via get_by_id() or fetch() which set firestore_1 to "xxx" or "yyy" then I want it initialize context base on data in firestore_1 (after retrieved)
I try to do the following
However, I found out that when I get data from firestore self.context run before firestore_1 has been set
I can't find the way to automatic run code after instance has finish created with value. Please advise
The text was updated successfully, but these errors were encountered: