5868: webapp xml import failed in trunk
svn: r19940
This commit is contained in:
parent
e1247426da
commit
38f5d57b7f
@ -790,18 +790,18 @@ class DbDjango(DbWriteBase, DbReadBase):
|
|||||||
|
|
||||||
def has_gramps_id(self, obj_key, gramps_id):
|
def has_gramps_id(self, obj_key, gramps_id):
|
||||||
key2table = {
|
key2table = {
|
||||||
PERSON_KEY: self.Person,
|
PERSON_KEY: self.dji.Person,
|
||||||
FAMILY_KEY: self.Family,
|
FAMILY_KEY: self.dji.Family,
|
||||||
SOURCE_KEY: self.Source,
|
SOURCE_KEY: self.dji.Source,
|
||||||
CITATION_KEY: self.Citation,
|
CITATION_KEY: self.dji.Citation,
|
||||||
EVENT_KEY: self.Event,
|
EVENT_KEY: self.dji.Event,
|
||||||
MEDIA_KEY: self.Media,
|
MEDIA_KEY: self.dji.Media,
|
||||||
PLACE_KEY: self.Place,
|
PLACE_KEY: self.dji.Place,
|
||||||
REPOSITORY_KEY: self.Repository,
|
REPOSITORY_KEY: self.dji.Repository,
|
||||||
NOTE_KEY: self.Note,
|
NOTE_KEY: self.dji.Note,
|
||||||
}
|
}
|
||||||
table = key2table[obj_key]
|
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):
|
def has_person_handle(self, handle):
|
||||||
if handle in self.import_cache:
|
if handle in self.import_cache:
|
||||||
|
Loading…
Reference in New Issue
Block a user