diff --git a/src/webapp/grampsdb/views.py b/src/webapp/grampsdb/views.py index e2ce70e26..8dc625c9c 100644 --- a/src/webapp/grampsdb/views.py +++ b/src/webapp/grampsdb/views.py @@ -233,6 +233,8 @@ def view_name_detail(request, handle, order, action="view"): n = form.save() else: action = "edit" + # FIXME: need to update cache + # FIXME: need to reset probabily_alive context = RequestContext(request) context["action"] = action context["tview"] = _('Name') diff --git a/src/webapp/reports.py b/src/webapp/reports.py index 1661d0f67..ad127d8db 100644 --- a/src/webapp/reports.py +++ b/src/webapp/reports.py @@ -47,6 +47,7 @@ def import_file(db, filename, callback): >>> import_file(DbDjango(), "/home/user/Untitled_1.ged", lambda a: a) """ + from grampsdb.models import Person dbstate = DbState.DbState() climanager = CLIManager(dbstate, False) # do not load db_loader climanager.do_reg_plugins(dbstate, None) @@ -68,6 +69,10 @@ def import_file(db, filename, callback): db.prepare_import() import_function(db, filename, callback) db.commit_import() + # FIXME: need to call probably_alive + for person in Person.objects.all(): + person.probably_alive = not bool(person.death) + person.save() return True return False