From cfcc82be788d3d53124dfa95e17b44bbbf9559f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 10 Feb 2025 01:39:24 +0100 Subject: [PATCH] Do not try to delete XML data without id If the record has already been cleaned, there is no need to try to delete again. (grafted from e5ed9fc71d218c967bdbfc9489773905e5a5466c) --HG-- branch : 6.0 --- trytond/trytond/convert.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trytond/trytond/convert.py b/trytond/trytond/convert.py index e1e642369c..7162bdb558 100644 --- a/trytond/trytond/convert.py +++ b/trytond/trytond/convert.py @@ -795,6 +795,9 @@ def post_import(pool, module, to_delete): for mrec in mdata: model, db_id, fs_id = mrec.model, mrec.db_id, mrec.fs_id + if db_id is None: + mdata_delete.append(mrec) + continue logger.info('Deleting %s@%s from %s.%s', db_id, model, module, fs_id) try: