From 41fd43c32bd873a0086b9360b75ddca4e9eb02c0 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sun, 25 Feb 2024 23:40:51 +0000 Subject: [PATCH] Fix filter rules missing the use_case parameter Fixes #13187. --- gramps/gen/filters/rules/_hastextmatchingregexpof.py | 4 ++-- .../rules/person/_hascommonancestorwithfiltermatch.py | 4 ++-- gramps/gen/filters/rules/person/_hasgallery.py | 6 +++--- gramps/gen/filters/rules/person/_hastextmatchingregexpof.py | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gramps/gen/filters/rules/_hastextmatchingregexpof.py b/gramps/gen/filters/rules/_hastextmatchingregexpof.py index be6e73f64b6..d9d80cc7e40 100644 --- a/gramps/gen/filters/rules/_hastextmatchingregexpof.py +++ b/gramps/gen/filters/rules/_hastextmatchingregexpof.py @@ -34,8 +34,8 @@ class HasTextMatchingRegexpOf(HasTextMatchingSubstringOf): Wrap HasTextMatchingSubstringOf to enable the regex_match parameter. """ - def __init__(self, list, use_regex=False): - HasTextMatchingSubstringOf.__init__(self, list, use_regex) + def __init__(self, list, use_regex=False, use_case=False): + HasTextMatchingSubstringOf.__init__(self, list, use_regex, use_case) # FIXME: This needs to be written for an arbitrary object # if possible diff --git a/gramps/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py b/gramps/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py index ec521077b94..78183cfa992 100644 --- a/gramps/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py +++ b/gramps/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py @@ -53,8 +53,8 @@ class HasCommonAncestorWithFilterMatch(HasCommonAncestorWith): ) category = _("Ancestral filters") - def __init__(self, list, use_regex=False): - HasCommonAncestorWith.__init__(self, list, use_regex) + def __init__(self, list, use_regex=False, use_case=False): + HasCommonAncestorWith.__init__(self, list, use_regex, use_case) self.ancestor_cache = {} def prepare(self, db, user): diff --git a/gramps/gen/filters/rules/person/_hasgallery.py b/gramps/gen/filters/rules/person/_hasgallery.py index 0fadcac073f..e27d36d1ece 100644 --- a/gramps/gen/filters/rules/person/_hasgallery.py +++ b/gramps/gen/filters/rules/person/_hasgallery.py @@ -44,10 +44,10 @@ class HavePhotos(HasGalleryBase): name = _("People with media") description = _("Matches people with a certain number of items in the gallery") - def __init__(self, arg, use_regex=False): + def __init__(self, arg, use_regex=False, use_case=False): # Upgrade from pre 3.1 HasPhotos filter, use defaults that correspond # Previous filter had 0 arguments if len(arg) == 0: - HasGalleryBase.__init__(self, ["0", "greater than"], use_regex) + HasGalleryBase.__init__(self, ["0", "greater than"], use_regex, use_case) else: - HasGalleryBase.__init__(self, arg, use_regex) + HasGalleryBase.__init__(self, arg, use_regex, use_case) diff --git a/gramps/gen/filters/rules/person/_hastextmatchingregexpof.py b/gramps/gen/filters/rules/person/_hastextmatchingregexpof.py index 46c3177038a..2f269e55e87 100644 --- a/gramps/gen/filters/rules/person/_hastextmatchingregexpof.py +++ b/gramps/gen/filters/rules/person/_hastextmatchingregexpof.py @@ -41,8 +41,8 @@ class HasTextMatchingRegexpOf(HasTextMatchingSubstringOf): """ - def __init__(self, list, use_regex=False): - HasTextMatchingSubstringOf.__init__(self, list, use_regex) + def __init__(self, list, use_regex=False, use_case=False): + HasTextMatchingSubstringOf.__init__(self, list, use_regex, use_case) def prepare(self, db, user): self.db = db