From be711f8bd93543862ab23d0fea9a2eb9eb9f7f7a Mon Sep 17 00:00:00 2001 From: SatCFDI Date: Wed, 10 Apr 2024 19:10:27 -0600 Subject: [PATCH] updated test requirements --- satcfdi/accounting/contabilidad.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/satcfdi/accounting/contabilidad.py b/satcfdi/accounting/contabilidad.py index fe382ee..fdb16d5 100644 --- a/satcfdi/accounting/contabilidad.py +++ b/satcfdi/accounting/contabilidad.py @@ -221,8 +221,9 @@ def validate_cuentas(cuentas): else: v['Nivel'] = 1 - v['CodAgrup'] = catalog_code('Cb9f_c_CodAgrup', v['CodAgrup']) - assert v['CodAgrup'].description, f"Unknown CodAgrup: {v['CodAgrup']}" + if isinstance(v['CodAgrup'], str): + v['CodAgrup'] = catalog_code('Cb9f_c_CodAgrup', v['CodAgrup']) + assert v['CodAgrup'].description, f"Unknown CodAgrup: {v['CodAgrup']}" for k, v in cuentas.items(): if v['SubCtaDe']: