[Fixed]-Django: cannot add foreight key to User

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)
👤alecxe

Leave a comment