Add in_game_name field to FriendCode model

This commit is contained in:
badblocks 2025-03-14 09:50:49 -07:00
parent 4792906907
commit bc181b12d9
19 changed files with 113 additions and 56 deletions

View file

@ -89,7 +89,7 @@ class DeleteFriendCodeView(LoginRequiredMixin, DeleteView):
return redirect(self.success_url)
# Also check if this friend code is referenced by any trade offer.
if self.object.initiated_by.exists() or self.object.accepted_by.exists():
if self.object.initiated_trade_offers.exists() or self.object.trade_acceptances.exists():
messages.error(
request,
"Cannot remove this friend code because there are existing trade offers associated with it."