Lets say I have two models. User and Post. I am iterating over the users and updating few fields lets day likes, dislike etc. The problem is, when I pass the likes n dislikes as integer, it is getting assigned as tuple and its causing issue while saving the record.
Following is the code I tried (Minimal example):
like = 123
dislike = 456
for user in users:
post = user.post
post.like = like # for now lets consider it as float field
post.dislike = dislike
post.save()
It produces the error as TypeError: float() argument must be a string or a number, not 'tuple'
Also, I checked the This question which sounds similar, but it is not answered yet.
Any suggestions whould be helpful.