Earthman deck: delete stray Pentacles courts; fix tarot_fan suit order

- Migration 0041: delete Maid/Jack/Queen/King of Pentacles (suit=PENTACLES,
  arcana=MINOR, numbers 11-14) from Earthman deck — duplicates of the correct
  CROWNS courts that already exist; escaped migration 0024's rename sweep
- tarot_fan view: _suit_order now uses Earthman suit names (BRANDS/GRAILS/BLADES/CROWNS)
  in correct display order; old Fiorentine names kept as fallback

Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-04-27 20:48:12 -04:00
parent a724479e60
commit e2c9dc4e8a
2 changed files with 33 additions and 1 deletions

View File

@@ -152,7 +152,8 @@ def tarot_fan(request, deck_id):
deck = get_object_or_404(DeckVariant, pk=deck_id)
if not request.user.unlocked_decks.filter(pk=deck_id).exists():
return HttpResponse(status=403)
_suit_order = {"WANDS": 0, "CUPS": 1, "SWORDS": 2, "PENTACLES": 3, "CROWNS": 3, "COINS": 4}
_suit_order = {"BRANDS": 0, "GRAILS": 1, "BLADES": 2, "CROWNS": 3,
"WANDS": 0, "CUPS": 1, "SWORDS": 2, "PENTACLES": 3}
cards = sorted(
TarotCard.objects.filter(deck_variant=deck),
key=lambda c: (0 if c.arcana == "MAJOR" else 1, _suit_order.get(c.suit or "", 9), c.number),