Browse Source

Fixed: Using default checked value for api transactions

master
Sebastian Lohff 11 years ago
parent
commit
b71b95436f
  1. 7
      k4ever/api2/handlers.py

7
k4ever/api2/handlers.py

@ -247,12 +247,7 @@ class TransactionTransactHandler(BaseHandler): @@ -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

Loading…
Cancel
Save