Verified transaction don’t get mined

I’m trying to check the following script on bitcoin testnet:

ex31a_txout_scriptPubKey = CScript([OP_2DUP, 1, Arash_public_key, Pouya_public_key, 2, OP_CHECKMULTISIGVERIFY,                                     OP_2DUP, 2, Arash_public_key, Pouya_public_key, 2, OP_CHECKMULTISIG,                                     OP_IF, OP_TRUE,                                     OP_ELSE, 2, J1_public_key, J2_public_key, J3_public_key, 3, OP_CHECKMULTISIG,                                     OP_ENDIF]) 

It is verified by the python library python-bitcoinlib that the following scriptSig can redeem the coin.

Arash_signature = create_OP_CHECKSIG_signature(txin, txout, txin_scriptPubKey,                                           Arash_private_key) Pouya_signature = create_OP_CHECKSIG_signature(txin, txout, txin_scriptPubKey,                                           Pouya_private_key) J2_signature = create_OP_CHECKSIG_signature(txin, txout, txin_scriptPubKey,                                           J2_private_key) J3_signature = create_OP_CHECKSIG_signature(txin, txout, txin_scriptPubKey,                                           J3_private_key)  dummy = 123 txin_scriptSig = CScript([dummy, J2_signature, J3_signature, Pouya_signature]) 

However my transaction don’t get mined on the testnet. I wonder whether there is a bug in my script or not!