Skip to content

Commit

Permalink
Fix loading decks from other accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
tspivey committed Jul 12, 2023
1 parent aa3fdd1 commit c288105
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ygo/parsers/room_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,13 @@ def deck(caller):
pl.notify(pl._("You don't need to mention yourself if you want to use your own deck."))
return

account = session.query(models.Account).filter_by(name=player_name).first()
target_account = session.query(models.Account).filter_by(name=player_name).first()

if not account:
if not target_account:
pl.notify(pl._("Player {0} could not be found.").format(player_name))
return

deck = models.Deck.find(session, account, deck_name)
deck = models.Deck.find_public(session, target_account, deck_name)

if not deck: # if deck is a name and still hasn't been found

Expand Down

0 comments on commit c288105

Please sign in to comment.