Skip to content

Commit

Permalink
Fix filter rules missing the use_case parameter
Browse files Browse the repository at this point in the history
Fixes #13187.
  • Loading branch information
Nick-Hall committed Mar 21, 2024
1 parent c6d2dda commit 41fd43c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions gramps/gen/filters/rules/_hastextmatchingregexpof.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions gramps/gen/filters/rules/person/_hasgallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ class HavePhotos(HasGalleryBase):
name = _("People with <count> 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)
4 changes: 2 additions & 2 deletions gramps/gen/filters/rules/person/_hastextmatchingregexpof.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41fd43c

Please sign in to comment.