(self, *args, **kwargs)
| 1842 | return self.query.output_field |
| 1843 | |
| 1844 | def resolve_expression(self, *args, **kwargs): |
| 1845 | resolved = super().resolve_expression(*args, **kwargs) |
| 1846 | if type(self) is Subquery and self.template == Subquery.template: |
| 1847 | resolved.query.contains_subquery = True |
| 1848 | # Subquery is an unnecessary shim for a resolved query as it |
| 1849 | # complexifies the lookup's right-hand-side introspection. |
| 1850 | try: |
| 1851 | self.output_field |
| 1852 | except AttributeError: |
| 1853 | return resolved.query |
| 1854 | if self.output_field and type(self.output_field) is not type( |
| 1855 | resolved.query.output_field |
| 1856 | ): |
| 1857 | return ExpressionWrapper(resolved.query, output_field=self.output_field) |
| 1858 | return resolved.query |
| 1859 | return resolved |
| 1860 | |
| 1861 | def copy(self): |
| 1862 | clone = super().copy() |
nothing calls this directly
no test coverage detected