(value)
| 147 | ): |
| 148 | # If the objects in the m2m have a natural key, use it |
| 149 | def handle_m2m(value): |
| 150 | if natural := self._resolve_natural_key(value): |
| 151 | # Iterable natural keys are rolled out as subelements |
| 152 | self.xml.startElement("object", {}) |
| 153 | for key_value in natural: |
| 154 | self.xml.startElement("natural", {}) |
| 155 | if key_value is None: |
| 156 | self.xml.addQuickElement("None") |
| 157 | else: |
| 158 | self.xml.characters(str(key_value)) |
| 159 | self.xml.endElement("natural") |
| 160 | self.xml.endElement("object") |
| 161 | else: |
| 162 | self.xml.addQuickElement("object", attrs={"pk": str(value.pk)}) |
| 163 | |
| 164 | def queryset_iterator(obj, field): |
| 165 | attr = getattr(obj, field.name) |
nothing calls this directly
no test coverage detected