mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 23:35:22 +01:00
Fix DeprecationWarning as-per ishirav's advice
This commit is contained in:
parent
abf01be889
commit
6384c698ad
1 changed files with 4 additions and 2 deletions
|
|
@ -135,8 +135,10 @@ class MatchingModel(models.Model):
|
|||
"""
|
||||
findterms = re.compile(r'"([^"]+)"|(\S+)').findall
|
||||
normspace = re.compile(r"\s+").sub
|
||||
return [normspace(r"\s+", (t[0] or t[1]).strip())
|
||||
for t in findterms(self.match)]
|
||||
return [
|
||||
normspace(" ", (t[0] or t[1]).strip()).replace(" ", r"\s+")
|
||||
for t in findterms(self.match)
|
||||
]
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue