Fixed: Using default checked value for api transactions
This commit is contained in:
parent
c0e9f81bf0
commit
b71b95436f
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue