Closed anisrfd closed 3 years ago
Error: "TypeError: insert_in_transaction() missing 1 required positional argument: 'user'."
The code snippet is given below:
''' from fireo.models import Model from fireo.fields import IDField, TextField, NumberField import fireo
transaction = fireo.transaction() class UserTransac(Model): id = IDField() name = TextField() age = NumberField() class TransecTest: def __init__(self): self.model = UserTransac() @fireo.transactional def insert_in_transaction(self, transaction, user): self.model.from_dict(user).save(transaction=transaction) def main(): user = {'name': "user.name", 'age': 88} TransecTest().insert_in_transaction(transaction, user) main()
"'
Thank you so much and now it's working.
Error: "TypeError: insert_in_transaction() missing 1 required positional argument: 'user'."
The code snippet is given below:
''' from fireo.models import Model from fireo.fields import IDField, TextField, NumberField import fireo
"'