Field 'id' expected a number but got ''.

Please do not post images of code or error messages here. They cannot be quoted for context, they cannot be searched when looking for information, and are unreadable on many devices.

Please copy/paste the relevant code and the text of the traceback message from the console as text within your posting.

When posting code, enclose each section (file, traceback, etc) between lines of three backtick - ` characters. You’ll have a line of ```, then the code (or message, etc), then another line of ```. This forces the software to keep the code properly formatted, which is critical with Python. Also make sure you use the backtick character - ` and not the apostrophe - '. Thanks!

1 Like

Hello,

You need to add parentheses to initialise the autofield product_id = models.AutoField()

-Graham