1👍
✅
You need to provide a default User ID for all the existing files. It has to be an existing User ID and an integer. It cannot be a datetime.date
.
Or, if applicable, you can make the File->User link optional:
user = models.ForeignKey(User, blank=True, null=True)
Source:stackexchange.com