|
1472 | 1472 |
|
1473 | 1473 | class Second(Parent):
|
1474 | 1474 | ...
|
| 1475 | +
|
| 1476 | +- case: test_m2m_models_manager_filter_kwargs_checked |
| 1477 | + main: | |
| 1478 | + from myapp.models import MyModel, Other |
| 1479 | + MyModel.objects.filter(xyz__isnull=False) # E: Cannot resolve keyword 'xyz' into field. Choices are: id, others [misc] |
| 1480 | + MyModel.objects.get(xyz__isnull=False) # E: Cannot resolve keyword 'xyz' into field. Choices are: id, others [misc] |
| 1481 | + MyModel.objects.exclude(xyz__isnull=False) # E: Cannot resolve keyword 'xyz' into field. Choices are: id, others [misc] |
| 1482 | + other = Other() |
| 1483 | + other.mymodel_set.filter(xyz__isnull=True) # E: Cannot resolve keyword 'xyz' into field. Choices are: id, mymodel, mymodel_id, other, other_id [misc] |
| 1484 | + other.mymodel_set.get(xyz__isnull=True) # E: Cannot resolve keyword 'xyz' into field. Choices are: id, mymodel, mymodel_id, other, other_id [misc] |
| 1485 | + other.mymodel_set.exclude(xyz__isnull=True) # E: Cannot resolve keyword 'xyz' into field. Choices are: id, mymodel, mymodel_id, other, other_id [misc] |
| 1486 | + MyModel.others.through.objects.filter(xyz__isnull=False) # E: Cannot resolve keyword 'xyz' into field. Choices are: id, mymodel, mymodel_id, other, other_id [misc] |
| 1487 | + MyModel.others.through.objects.get(xyz__isnull=False) # E: Cannot resolve keyword 'xyz' into field. Choices are: id, mymodel, mymodel_id, other, other_id [misc] |
| 1488 | + MyModel.others.through.objects.exclude(xyz__isnull=False) # E: Cannot resolve keyword 'xyz' into field. Choices are: id, mymodel, mymodel_id, other, other_id [misc] |
| 1489 | + installed_apps: |
| 1490 | + - myapp |
| 1491 | + files: |
| 1492 | + - path: myapp/__init__.py |
| 1493 | + - path: myapp/models.py |
| 1494 | + content: | |
| 1495 | + from django.db import models |
| 1496 | + class Other(models.Model): |
| 1497 | + ... |
| 1498 | +
|
| 1499 | + class MyModel(models.Model): |
| 1500 | + others = models.ManyToManyField(Other) |
0 commit comments