I have a model named vendor which have some fields when i enter other attributes in this model and run migrations it gave me this error “TypeError: fromisoformat: argument must be str” I have checked all attributes and their properties and change them but it still gives me this error.
After this error when i add any attributes in any model it is giving me this error and when i run “python manage.py runserver” command it shows me that you have (number) of unapplied migratoions.
I have try to delete the all migrations and make new migrations but it is not solving my problem.
My vendor model is this…
class Vendor(models.Model):
user = models.ForeignKey(
get_user_model(),
on_delete=models.CASCADE,default=1
)
vendorName = models.TextField(null=True)
vendorFatherName=models.TextField(null=True)
vendorEmail=models.EmailField(null=True)
vendorCNIC = models.CharField(max_length=15,default=None)
vendorContact = models.CharField(max_length=15,default=None)
vendorAddress = models.TextField(null=True)
vendorBusinessName=models.TextField(null=True)
vendorBusiness=models.TextField(null=True)
vendorBusinessAddress=models.TextField(null=True)
vendorBusinessContact=models.CharField(max_length=15,default=None)
vendorCurrentBalance=models.DecimalField(max_digits=10, decimal_places=2, default=0.0)
vendorOpeningBalance=models.DecimalField(max_digits=10, decimal_places=2, default=0.0)
vendorOpeningBalanceDate=models.DateField(blank=True, null=True)
Is this issue related to DateField because i have added DateField in other models before but it will not gaves me any error but this time it gives me this error and when i try to add other attribute in different model it is giving me the same error…