Append a sequence of (field, model, value) triples to the internal list that will be used to generate the UPDATE query. Might be more usefully called add_update_targets() to hint at the extra information here.
(self, values_seq)
| 104 | return self.add_update_fields(values_seq) |
| 105 | |
| 106 | def add_update_fields(self, values_seq): |
| 107 | """ |
| 108 | Append a sequence of (field, model, value) triples to the internal list |
| 109 | that will be used to generate the UPDATE query. Might be more usefully |
| 110 | called add_update_targets() to hint at the extra information here. |
| 111 | """ |
| 112 | for field, model, val in values_seq: |
| 113 | # Omit generated fields. |
| 114 | if field.generated: |
| 115 | continue |
| 116 | if hasattr(val, "resolve_expression"): |
| 117 | # Resolve expressions here so that annotations are no longer |
| 118 | # needed |
| 119 | val = val.resolve_expression(self, allow_joins=False, for_save=True) |
| 120 | self.values.append((field, model, val)) |
| 121 | |
| 122 | def add_related_update(self, model, field, value): |
| 123 | """ |
no test coverage detected