Answer the question
In order to leave comments, you need to log in
Why does django's object filter return invalid literal for int() with base 10: 'New'?
There is the following problematic line of code
list_reports = ReportInfo.objects.filter(status='Новый')
class ReportStatus(models.Model):
name = models.CharField(max_length=25)
def __str__(self):
return self.name
class ReportInfo(models.Model):
name = models.CharField(max_length=80)
status = models.ForeignKey(ReportStatus, null=True, on_delete=models.DO_NOTHING)
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