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) tType = TransactionType.objects.get(id=tTypeId)
except TransactionType.DoesNotExist: except TransactionType.DoesNotExist:
return getError(rc.BAD_REQUEST, "Your TransactionType could not be found") return getError(rc.BAD_REQUEST, "Your TransactionType could not be found")
trans = Transaction() trans = Transaction(user=request.user, transactionType=tType, amount=amount, checked=not tType.needsCheck)
trans.user = request.user
trans.transactionType = tType
trans.dateTime = datetime.datetime.now()
trans.amount = amount
trans.save() trans.save()
return rc.ALL_OK return rc.ALL_OK