7021: merge r22867 fix of #6863 to trunk

git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22929 4ae1f11a-8b86-4847-b8af-ab372f36d1fd
Make webapp work in trunk, copying changes from gramps40

git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22930 4ae1f11a-8b86-4847-b8af-ab372f36d1fd