Fixed: Using default checked value for api transactions

This commit is contained in:
Sebastian Lohff 2011-11-09 20:58:20 +01:00
parent c0e9f81bf0
commit b71b95436f
1 changed files with 1 additions and 6 deletions

View File

@ -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