se mejora el acceso a doc.get('FolioPref') para que cuando sea None no de error
This commit is contained in:
1 parent
2be35d7e55
commit
839aad698d
1 file changed
+8
-8
@@ -146,14 +146,14 @@ def procesar_lote(token):
|
||||
if not _running:
|
||||
return
|
||||
|
||||
ruc = doc.get("LicTradNum", "").strip()
|
||||
tipo_cpe = doc.get("Indicator", "").strip()
|
||||
serie = doc.get("FolioPref", "").strip()
|
||||
numero = str(doc.get("FolioNum", "")).strip()
|
||||
docentry = doc.get("DocEntry")
|
||||
docnum = doc.get("DocNum", "")
|
||||
tiene_pdf = doc.get("tienePDF", "N")
|
||||
tiene_xml = doc.get("tieneXML", "N")
|
||||
ruc = (doc.get("LicTradNum") or "").strip()
|
||||
tipo_cpe = (doc.get("Indicator") or "").strip()
|
||||
serie = (doc.get("FolioPref") or "").strip()
|
||||
numero = doc.get("FolioNum") or 0
|
||||
docentry = doc.get("DocEntry") or 0
|
||||
docnum = doc.get("DocNum") or 0
|
||||
tiene_pdf = (doc.get("tienePDF") or "N").strip()
|
||||
tiene_xml = (doc.get("tieneXML") or "N").strip()
|
||||
|
||||
if not ruc or not tipo_cpe or not serie or not numero:
|
||||
print(f" ⚠️ DocEntry={docentry} DocNum={docnum}: datos incompletos, saltando")
|
||||
|
||||
Reference in new issue
Block a user