Add in_game_name field to FriendCode model
This commit is contained in:
parent
4792906907
commit
bc181b12d9
19 changed files with 113 additions and 56 deletions
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue