From 18d6f7ed32261fa1ed296b8abbb73d43554c0d07 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 26 Mar 2020 22:11:59 +0000 Subject: [PATCH] Fix `add_card` quantity bug --- houdini/penguin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/houdini/penguin.py b/houdini/penguin.py index c7f5df0..b891086 100644 --- a/houdini/penguin.py +++ b/houdini/penguin.py @@ -193,15 +193,15 @@ class Penguin(Spheniscidae, penguin.Penguin): return True - async def add_card(self, card, quantity=1, member_quantity=0): + async def add_card(self, card, quantity=0, member_quantity=0): if card.id in self.cards: penguin_card = self.cards[card.id] await penguin_card.update( quantity=penguin_card.quantity + quantity, - member_quantity=member_quantity).apply() + member_quantity=penguin_card.member_quantity + member_quantity).apply() else: - await self.cards.insert(card_id=card.id) + await self.cards.insert(card_id=card.id, quantity=quantity, member_quantity=member_quantity) self.logger.info(f'{self.username} added \'{card.name}\' to their ninja deck')