According to this article it depends on what kind of bankruptcy (Chapt.7 vs. Chapt. 13)
My experience is limited to experiencing the bankruptcy of my husband’s ex-wife and I can tell you that although the debts were clearly hers (per the divorce decree and also incurred AFTER their divorce) creditors still came after my husband (her ex) and me. We ended up paying thousands of dollars and my husband’s credit rating was very adversely affected for about 5 years.
Best to be cautious – because my experience is that in bankruptcy the creditors can (and will) come after the other person to collect on debts – even those that are discharged in the bankruptcy.