django-stubs icon indicating copy to clipboard operation
django-stubs copied to clipboard

Django stubs is crashing for the filed name type

Open NeurlAP opened this issue 3 years ago • 0 comments

Bug report

What's wrong

django stubs is crashing with the below errror when I'm naming the field name type to models.CharField django model. error traceback

raise FieldDoesNotExist("%s has no field named '%s'" % (self.object_name, field_name))
FieldDoesNotExist: StorePage has no field named 'type' 

eg: field

type = models.CharField(max_length=50, null=True, choices=TYPE_CHOICES)

How is that should be

System information

  • OS:
  • python version: 3.9
  • django version: 3.2.14
  • mypy version: 0.961
  • django-stubs version: 1.12.0
  • django-stubs-ext version: 0.5.0

NeurlAP avatar Aug 24 '22 08:08 NeurlAP