From bcf6683873af6ede4c5e8f754f2f6c87caf86437 Mon Sep 17 00:00:00 2001 From: Piotr Staroszczyk Date: Wed, 11 Feb 2015 09:54:18 +0100 Subject: [PATCH] core: fix #135 type conversion in quickSell & watchlistDelete --- AUTHORS.rst | 1 + fut/core.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index f491b24..dd86e51 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -19,3 +19,4 @@ Patches and Suggestions - Innursery - Arthur Nogueira Neves @arthurnn - jamslater +- rjansen diff --git a/fut/core.py b/fut/core.py index 53092d9..8609370 100644 --- a/fut/core.py +++ b/fut/core.py @@ -525,7 +525,7 @@ def sell(self, item_id, bid, buy_now=0, duration=3600): def quickSell(self, item_id): """Quick sell.""" if not isinstance(item_id, (list, tuple)): - item_id = (item_id) + item_id = (item_id,) item_id = (str(i) for i in item_id) params = {'itemIds': ','.join(item_id)} self.__delete__(self.urls['fut']['Item'], params=params) # returns nothing @@ -534,7 +534,7 @@ def quickSell(self, item_id): def watchlistDelete(self, trade_id): """Removes cards from watchlist.""" if not isinstance(trade_id, (list, tuple)): - trade_id = (trade_id) + trade_id = (trade_id,) trade_id = (str(i) for i in trade_id) params = {'tradeId': ','.join(trade_id)} self.__delete__(self.urls['fut']['WatchList'], params=params) # returns nothing