[Fixed]-Invalid literal for int() with base 10: 'Requires moderation'

1👍

'Requires moderation' only relates to the human readable string for your given choice. Instead you need to use the integer that represents that choice for your default

models.SmallIntegerField(_("Status"), choices=STATUS_CHOICES, default=FOR_MODERATION)
👤Sayse

0👍

Your status field is a SmallIntegerField with a default value of the string “Requires Moderation”. You can’t put such a string in a numeric field.

The trick to finding this is to find where Requires Moderation appears in your code.

👤zmbq

Leave a comment