From dcf92a05baacd63532f873ebf47cc01954b43d63 Mon Sep 17 00:00:00 2001 From: Kevin_Ramirez Date: Wed, 11 Feb 2026 11:01:10 -0600 Subject: [PATCH] Se eliminaron scripts de ayuda --- backend/sync_invoice_types.py | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 backend/sync_invoice_types.py diff --git a/backend/sync_invoice_types.py b/backend/sync_invoice_types.py deleted file mode 100644 index cdcf23b5..00000000 --- a/backend/sync_invoice_types.py +++ /dev/null @@ -1,35 +0,0 @@ -from core.database import CoreSessionLocal -from api.v1.modules.public.reference_data.invoice_types.models import InvoiceType -from api.v1.modules.public.reference_data.invoice_types.seed import seed - -def sync_invoice_types(): - db = CoreSessionLocal() - try: - for s in seed: - key, description, note, type_, operation = s - obj = db.query(InvoiceType).filter(InvoiceType.key == key).first() - if obj: - print(f"Updating {key}...") - obj.description = description - obj.note = note - obj.type = type_ - obj.operation = operation - else: - print(f"Creating {key}...") - obj = InvoiceType( - key=key, - description=description, - note=note, - type=type_, - operation=operation - ) - db.add(obj) - db.commit() - except Exception as e: - print(f"Error: {e}") - db.rollback() - finally: - db.close() - -if __name__ == "__main__": - sync_invoice_types()