2007-01-25 Alex Roitman <shura@gramps-project.org>

* src/GrampsDb/_GrampsDbBase.py (find_backlink_handles): Correctly
	iterate only over requested tables; don't mix up the primary and
	the referenced objects.



svn: r7983
This commit is contained in:
Alex Roitman 2007-01-25 17:04:37 +00:00
parent 4093124232
commit 0bd3fab3c8
2 changed files with 15 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2007-01-25 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsDbBase.py (find_backlink_handles): Correctly
iterate only over requested tables; don't mix up the primary and
the referenced objects.
2007-01-25 Brian Matherly <brian@gramps-project.org>
* src/plugins/IndivComplete.py: Put children on new lines

View File

@ -2152,9 +2152,15 @@ class GrampsDbBase(GrampsDBCallback):
}
# Find which tables to iterate over
if (include_classes == None):
the_tables = primary_tables.keys()
else:
the_tables = include_classes
# Now we use the functions and classes defined above to loop through
# each of the existing primary object tables
for primary_table_name in primary_tables.keys():
for primary_table_name in the_tables:
cursor = primary_tables[primary_table_name]['cursor_func']()
data = cursor.first()
@ -2169,12 +2175,9 @@ class GrampsDbBase(GrampsDBCallback):
# Now we need to loop over all object types
# that have been requests in the include_classes list
for classname in primary_tables.keys():
if (include_classes == None) \
or (classname in include_classes):
if obj.has_handle_reference(classname,handle):
yield (primary_table_name, found_handle)
for classname in primary_tables.keys():
if obj.has_handle_reference(classname,handle):
yield (primary_table_name, found_handle)
data = cursor.next()