I kind of suck at boolean algebra, but:
https://github.com/bitcoin/bitcoin/blob/37612099ec7314b15a07d8bac55161ed4e8e7491/src/rpc/rawtransaction.cpp#L1672


Unless I'm mistaken (which is highly likely) the whole thing can't work  (except the edge case where `permitsigdata=true` and you have no sig data) 
PartiallySignedTransaction psbtx;
    std::string error;
    if (!DecodePSBT(psbtx, request.params[0].get_str(), error)) {
        throw JSONRPCError(RPC_DESERIALIZATION_ERROR, strprintf("TX decode failed %s", error));
    }
    
    bool complete = true;
    for (unsigned int i = 0; i < psbtx.tx->vin.size(); ++i) {
        PSBTInput& input = psbtx.inputs.at(i);
        complete &= SignPSBTInput(DUMMY_SIGNING_PROVIDER, *psbtx.tx, input, i, 1);
    }
    UniValue result(UniValue::VOBJ);
    CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
    bool extract = request.params[1].isNull() || (!request.params[1].isNull() && request.params[1].get_bool());
    if (complete && extract) {
        CMutableTransaction mtx(*psbtx.tx);
        for (unsigned int i = 0; i < mtx.vin.size(); ++i) {
            mtx.vin[i].scriptSig = psbtx.inputs[i].final_script_sig;
            mtx.vin[i].scriptWitness = psbtx.inputs[i].final_script_witness;
        }
        ssTx << mtx;
        result.pushKV("hex", HexStr(ssTx.begin(), ssTx.end()));
    } else {
        ssTx << psbtx;
        result.pushKV("psbt", EncodeBase64((unsigned char*)ssTx.data(), ssTx.size()));
    }
    result.pushKV("complete", complete);
    return result;
}
UniValue createpsbt(const JSONRPCRequest& request)