@ -272,7 +272,7 @@ class TransactionTransactHandler(BaseHandler):
def create ( self , request ) :
def create ( self , request ) :
""" Transact money to an account
""" Transact money to an account
- amount : [ req ] Amount to add to the user ' s account
- amount : [ req ] Amount to add to the user ' s account (!= 0)
- type : [ req ] Type of transaction ( id )
- type : [ req ] Type of transaction ( id )
"""
"""
@ -282,8 +282,8 @@ class TransactionTransactHandler(BaseHandler):
amount = getDecimal ( request . data , ' amount ' , Decimal ( 0 ) )
amount = getDecimal ( request . data , ' amount ' , Decimal ( 0 ) )
tTypeId = getInt ( request . data , ' type ' , - 1 )
tTypeId = getInt ( request . data , ' type ' , - 1 )
if amount < Decimal ( " 0.0 1 " ) :
if amount == Decimal ( " 0.0 " ) :
return getError ( rc . BAD_REQUEST , " A negative amount (or zeroed) is not supported right now (there has not been put enough thought into the ' lending money ' process " )
return getError ( rc . BAD_REQUEST , " A n amount equaling zero is not supported " )
tType = None
tType = None
try :
try :
tType = TransactionType . objects . get ( id = tTypeId )
tType = TransactionType . objects . get ( id = tTypeId )