From f9f3a3c1c0a1a7c2a6310da0bb28464a7eb8b55a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 4 Sep 2011 14:42:52 +0200 Subject: [PATCH] do not create a secondary object if there's no mailnumber --- themis/libellioimport/migration.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/themis/libellioimport/migration.py b/themis/libellioimport/migration.py index 8f89813..55285f1 100644 --- a/themis/libellioimport/migration.py +++ b/themis/libellioimport/migration.py @@ -157,6 +157,10 @@ class Migrate(BrowserView): # this document was not completed, do not create a secondary object second_object_typename = None + if not ob.mailnumber: + # if there's no mailnumber, do not create a secondary object + second_object_typename = None + if second_object_typename: # XXX: this is a temporary location, no decision has been taken yet # on the location of those documents