From b71b95436f8b258728d0a1111aef9744d6643b08 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Wed, 9 Nov 2011 20:58:20 +0100 Subject: [PATCH] Fixed: Using default checked value for api transactions --- k4ever/api2/handlers.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/k4ever/api2/handlers.py b/k4ever/api2/handlers.py index 2fba599..9a14e7a 100644 --- a/k4ever/api2/handlers.py +++ b/k4ever/api2/handlers.py @@ -247,12 +247,7 @@ class TransactionTransactHandler(BaseHandler): tType = TransactionType.objects.get(id=tTypeId) except TransactionType.DoesNotExist: return getError(rc.BAD_REQUEST, "Your TransactionType could not be found") - trans = Transaction() - trans.user = request.user - trans.transactionType = tType - trans.dateTime = datetime.datetime.now() - trans.amount = amount - + trans = Transaction(user=request.user, transactionType=tType, amount=amount, checked=not tType.needsCheck) trans.save() return rc.ALL_OK