From 7f484ffc52789deff2f534efddb718657aa2d25f Mon Sep 17 00:00:00 2001 From: seba Date: Tue, 11 Oct 2011 01:34:07 +0200 Subject: [PATCH] Fix: Bulkbuying requires now items to be bought. --- k4ever/api2/handlers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/k4ever/api2/handlers.py b/k4ever/api2/handlers.py index 9da7625..9f64a33 100644 --- a/k4ever/api2/handlers.py +++ b/k4ever/api2/handlers.py @@ -145,6 +145,12 @@ class BuyableItemHandler(BaseHandler): ret.write("\nThe items/deposists parameter have to be a list.\n") return ret + if len(itemList) == 0: + ret = rc.BAD_REQUEST + ret.write("\nYour request contains no items/deposits.\n") + return ret + + ids = {} for item in itemList: if not ids.has_key(item):