diff --git a/gramps/gui/plug/quick/_quickreports.py b/gramps/gui/plug/quick/_quickreports.py index 4cca1f298..46948c394 100644 --- a/gramps/gui/plug/quick/_quickreports.py +++ b/gramps/gui/plug/quick/_quickreports.py @@ -257,14 +257,12 @@ def run_report(dbstate, uistate, category, handle, pdata, container=None, elif category == CATEGORY_QR_CITATION : obj = dbstate.db.get_citation_from_handle(handle) elif category == CATEGORY_QR_SOURCE_OR_CITATION : - source = dbstate.db.get_source_from_handle(handle) - citation = dbstate.db.get_citation_from_handle(handle) - if (not source and not citation) or (source and citation): - raise ValueError("selection must be either source or citation") - if citation: - obj = citation + if dbstate.db.has_source_handle(handle): + obj = dbstate.db.get_source_from_handle(handle) + elif dbstate.db.has_citation_handle(handle): + obj = dbstate.db.get_citation_from_handle(handle) else: - obj = source + raise ValueError("selection must be either source or citation") elif category == CATEGORY_QR_PLACE : obj = dbstate.db.get_place_from_handle(handle) elif category == CATEGORY_QR_MEDIA : diff --git a/gramps/plugins/quickview/quickview.gpr.py b/gramps/plugins/quickview/quickview.gpr.py index f151359fa..86567dcb4 100644 --- a/gramps/plugins/quickview/quickview.gpr.py +++ b/gramps/plugins/quickview/quickview.gpr.py @@ -207,7 +207,7 @@ refitems = [(CATEGORY_QR_PERSON, 'person', _("Person")), (CATEGORY_QR_MEDIA, 'media', _("Media")), (CATEGORY_QR_NOTE, 'note', _("Note")), (CATEGORY_QR_CITATION, 'citation', _("Citation")), - (CATEGORY_QR_SOURCE_OR_CITATION, 'source or citation', + (CATEGORY_QR_SOURCE_OR_CITATION, 'source_or_citation', _("Source or Citation")) ]