def duplicate_txn_id(ipn_obj):
 return (ipn_obj._default_manager.filter(txn_id=ipn_obj.txn_id).count() > 0)

def duplicate_txn_id ( ipn_obj ) : return ( ipn_obj . _default_manager . filter ( txn_id = ipn_obj . txn_id ) . count ( ) > 0 )
returns true if a record with this transaction id exists .