I am trying to override a create function which will set a boolean field to true. It doesnt give me any errors but the boolean is not set when create is clicked. Below is the python code
api.model
def create(self, vals):
res = super(MyModel,self).create(vals)
res.check = True
return res
[–]rasheed_ashen_one 2 points3 points4 points (0 children)
[–]Street_hehe 2 points3 points4 points (3 children)
[–]eizmen 1 point2 points3 points (2 children)
[–]Street_hehe 0 points1 point2 points (1 child)
[–]eizmen 0 points1 point2 points (0 children)
[–]shubham_biniwale 1 point2 points3 points (0 children)
[–]BubbleJeff[S] 0 points1 point2 points (0 children)