Answer the question
In order to leave comments, you need to log in
ValueError invalid literal for int()?
There is a class that stores request forms in the cache, the current user is used to create it. Throws an error when creating a class object, although the data is correct and the debugger shows that everything is passed correctly, but the error is still there. What could be the reason?
Object creation:
cache, created = ContactCache.objects.get_or_create(user_id=request.user.id)
class ContactCache(models.Model):
user_id = models.IntegerField(blank=True, unique=True)
KEY = models.IntegerField(default='', null=True, blank=True)
info = models.CharField(max_length=100, default='', blank=True)
type = models.CharField(max_length=100, default='', blank=True)
subject = models.CharField(max_length=100, default='', blank=True)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question