Context:
I was able to set a user to PREMIUM from the admin panel but after resetting the database I see this error. I'm unable to figure out what's going on or how to fix it.
The error is: "Select a valid choice. PREMIUM is not one of the available choices".
Here is code for my Profile class:
class Profile(models.Model):
PREMIUM_CHOICES = (("FREE",0),("PREMIUM",1))
user = models.OneToOneField(User,primary_key=True,on_delete=models.CASCADE)
premium = models.IntegerField(choices=PREMIUM_CHOICES,default=0)
due_date = models.DateField(null=True)
I've looked at several answers on Stackoverflow: MongoDB database. Error "Select a valid choice. That choice is not one of the available choices."
Here is screen capture of the error:
