Keep marketplace purchase history when a seller is deleted

Taken offers now survive seller deletion (seller SET_NULL) so buyers keep
their history; open and withdrawn offers are still removed with the seller.
Update documented test counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mikei386andClaude Opus 5.5 committed 2026-11-21 12:38:41 +01:00
1 parent b272581606
commit e45b020700
5 files changed
+56 -5

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@
<div class="table-wrap"><table>
<thead><tr><th>Datum</th><th>Filament</th><th>Spulenausführung</th><th>Rollen</th><th>Gesamt</th><th>Status</th><th>Anbieter</th><th>Übernommen von</th></tr></thead>
<tbody>{% for offer in completed %}
<tr><td>{{ offer.completed_at|date:"d.m.Y H:i" }}</td><td>{{ offer.variant.product_type }} · {{ offer.variant.color_label }}</td><td>{{ offer.get_spool_type_display }}</td><td>{{ offer.quantity }}</td><td>{{ offer.total_price|floatformat:2 }} €</td><td>{{ offer.get_status_display }}</td><td>{{ offer.seller.username }}</td><td>{{ offer.buyer.username|default:"–" }}</td></tr>
<tr><td>{{ offer.completed_at|date:"d.m.Y H:i" }}</td><td>{{ offer.variant.product_type }} · {{ offer.variant.color_label }}</td><td>{{ offer.get_spool_type_display }}</td><td>{{ offer.quantity }}</td><td>{{ offer.total_price|floatformat:2 }} €</td><td>{{ offer.get_status_display }}</td><td>{{ offer.seller.username|default:"–" }}</td><td>{{ offer.buyer.username|default:"–" }}</td></tr>
{% endfor %}</tbody>
</table></div>
</section>