From 9ad0df49c7b73298dd496244866a04aa60bbe6d4 Mon Sep 17 00:00:00 2001 From: hernani Date: Fri, 23 Apr 2010 23:25:53 +0000 Subject: [PATCH] make sure where not recreating subscription settings for the admin user git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@69 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum_modules/sximporter/importer.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/forum_modules/sximporter/importer.py b/forum_modules/sximporter/importer.py index 7b54506..a16b29c 100644 --- a/forum_modules/sximporter/importer.py +++ b/forum_modules/sximporter/importer.py @@ -120,8 +120,11 @@ def userimport(dump, options): osqau.save() - s = orm.SubscriptionSettings(user=osqau) - s.save() + try: + orm.SubscriptionSettings.objects.get(user=osqau) + except: + s = orm.SubscriptionSettings(user=osqau) + s.save() uidmapper[osqau.id] = osqau.id else: -- 2.39.5