From 38f5d57b7fb6a7c840548228ef588cda8f241ae7 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 30 Jun 2012 12:14:23 +0000 Subject: [PATCH] 5868: webapp xml import failed in trunk svn: r19940 --- src/webapp/dbdjango.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/webapp/dbdjango.py b/src/webapp/dbdjango.py index d9640b0ca..d9cff5d31 100644 --- a/src/webapp/dbdjango.py +++ b/src/webapp/dbdjango.py @@ -790,18 +790,18 @@ class DbDjango(DbWriteBase, DbReadBase): def has_gramps_id(self, obj_key, gramps_id): key2table = { - PERSON_KEY: self.Person, - FAMILY_KEY: self.Family, - SOURCE_KEY: self.Source, - CITATION_KEY: self.Citation, - EVENT_KEY: self.Event, - MEDIA_KEY: self.Media, - PLACE_KEY: self.Place, - REPOSITORY_KEY: self.Repository, - NOTE_KEY: self.Note, + PERSON_KEY: self.dji.Person, + FAMILY_KEY: self.dji.Family, + SOURCE_KEY: self.dji.Source, + CITATION_KEY: self.dji.Citation, + EVENT_KEY: self.dji.Event, + MEDIA_KEY: self.dji.Media, + PLACE_KEY: self.dji.Place, + REPOSITORY_KEY: self.dji.Repository, + NOTE_KEY: self.dji.Note, } table = key2table[obj_key] - return table.objects.filter(gramps_id=gramps_id).count() > 0 + return table.filter(gramps_id=gramps_id).count() > 0 def has_person_handle(self, handle): if handle in self.import_cache: