git-subtree-dir: fiscal git-subtree-mainline:d95165fc8fgit-subtree-split:102ba84500
26 lines
766 B
Python
26 lines
766 B
Python
"""Seed reviewed official legacy NCM evidence; it never selects a successor."""
|
|
|
|
from central.app.db import SessionLocal
|
|
from central.app.models import LegacyNcmEntry
|
|
|
|
|
|
LEGACY_NCM = {
|
|
"code": "02071400",
|
|
"source": "Siscomex NCM official nomenclature download",
|
|
"source_date": "2026-09-17",
|
|
"reason": "NCM not present in current official nomenclature; no official successor.",
|
|
}
|
|
|
|
|
|
def main():
|
|
with SessionLocal() as session:
|
|
entry = session.get(LegacyNcmEntry, LEGACY_NCM["code"])
|
|
if entry is None:
|
|
session.add(LegacyNcmEntry(**LEGACY_NCM, successor_code=None))
|
|
session.commit()
|
|
print({"code": LEGACY_NCM["code"], "status": "LEGACY_NCM", "successor_code": None})
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|