Extrait public
Verrouillé
Error + stack trace + code → reproduction conditions, ranked hypotheses with the check that confirms each, minimal fix in your code style, regression test, how to prevent it next time…
À propos de ce prompt
Paste the error, the stack trace and the relevant code: the prompt works like a senior engineer. It ranks the likely causes, tells you exactly what to check to confirm each one, then proposes a minimal fix and a test that would have caught the bug.
Exemple de résultat
1. Reading the trace
The error is raised in orders/services.py, line 88 — the last line of your code before Django internals. `NoneType has no attribute 'email'` means `order.customer` is None at that point.
2. Hypotheses
H1 (most likely): guest checkouts create orders without a customer, and send_confirmation() assumes one exists. Fits: "only sometimes", started after guest checkout shipped.
H2: the customer was deleted after ordering (on_delete=SET_NULL)…
3. Checks
- Run: Order.objects.filter(customer__isnull=True).count() → if > 0, H1 or H2 confirmed…
4. Fix
```python
recipient = order.customer.email if order.customer else order.guest_email
```
Fiche technique
- Modèle
- Claude
- Langue du prompt
- Anglais
- Pour qui
- Developers stuck on a bug who want a methodical second pair of eyes
- Longueur
- ~415 tokens (estimation)
- Format livré
- Texte du prompt, affiché en ligne après achat
- Rayon
- Code & Développement
Avis
Aucun avis pour l'instant. Seuls les acheteurs de ce prompt peuvent en laisser un.