| | 15 | {{{#!div style="font-size: 80%" |
| | 16 | Error: |
| | 17 | {{{ |
| | 18 | ............E.s................ |
| | 19 | ====================================================================== |
| | 20 | ERROR: test_select_related_empty_join (filtered_relation.tests.FilteredRelationTests) |
| | 21 | ---------------------------------------------------------------------- |
| | 22 | Traceback (most recent call last): |
| | 23 | File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor |
| | 24 | yield |
| | 25 | File "/usr/lib/python3.6/unittest/case.py", line 605, in run |
| | 26 | testMethod() |
| | 27 | File "/home/adv/projects/github/django/tests/filtered_relation/tests.py", line 46, in test_select_related_empty_join |
| | 28 | ).select_related('empty_join') |
| | 29 | File "/usr/lib/python3.6/unittest/case.py", line 674, in assertFalse |
| | 30 | if expr: |
| | 31 | File "/home/adv/projects/github/django/django/db/models/query.py", line 271, in __bool__ |
| | 32 | self._fetch_all() |
| | 33 | File "/home/adv/projects/github/django/django/db/models/query.py", line 1232, in _fetch_all |
| | 34 | self._result_cache = list(self._iterable_class(self)) |
| | 35 | File "/home/adv/projects/github/django/django/db/models/query.py", line 67, in __iter__ |
| | 36 | rel_populator.populate(row, obj) |
| | 37 | File "/home/adv/projects/github/django/django/db/models/query.py", line 1876, in populate |
| | 38 | self.local_setter(from_obj, obj) |
| | 39 | File "/home/adv/projects/github/django/django/db/models/sql/compiler.py", line 892, in local_setter |
| | 40 | f.remote_field.set_cached_value(from_obj, obj) |
| | 41 | File "/home/adv/projects/github/django/django/db/models/fields/mixins.py", line 23, in set_cached_value |
| | 42 | instance._state.fields_cache[self.get_cache_name()] = value |
| | 43 | AttributeError: 'NoneType' object has no attribute '_state' |
| | 44 | |
| | 45 | ---------------------------------------------------------------------- |
| | 46 | }}} |
| | 47 | }}} |