[Django]-Models Django invalid literal for int() with base 10: 'None'

6👍

Instead of default="None", specify null=True to allow null for foreign key:

category = models.ForeignKey(Category, null=True)

Leave a comment