A debtor who may have consented to the assignment of rights made by a creditor in favor of a third person, cannot oppose, against the assignee, the compensation which should pertain to him against the assignor.
If the creditor gave him notice of the assignment and the debtor did not consent thereto, he may oppose compensation for prior debts, but not for subsequent ones.
If the assignment is made without knowledge of the debtor, he may oppose compensation for prior credits, and for subsequent ones, until he should have been informed of the assignment.
History —Civil Code, 1930, § 1152.