I want to implement next situation in my save function in model: if factor_rate
exists in database ( not None
) -> than do something. But in my case 0
is acceptable value for me, user can provide this value in form. And I don't know how to separate None from 0. Do you have any idea?
if self.factor_rate:
self.status = False
else:
self.status = True