I have two forms I sent to a template and when I got them all models were retrieved and saved, but the last model takes all the other models and save itself, also it does not save itself. I get an error like this below. Can anyone help me out please?
Exception Type: TypeError
Exception Value: int() argument must be a string or a number, not 'tuple'
I tracked it down and the problem look like just one in put from the form there is how it look from the form
class AForm(ModelForm):
mentancy_fee = forms.IntegerField(required=False)
and here his its defination from the model
class AgentLandLordContract(models.Model):
mentancy_fee = models.IntegerField(default=0,blank=True,null = True)
so why is this form field returning a tuple and not an it.I blocked out just this filed from the form and all is well
in the form i left a comma at the end of a field this made the form input into a tuple and when i found it all was ok