Skip to content

Commit

Permalink
fix: ignore empty patterns for resolver priority
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhd1701 committed Jul 13, 2022
1 parent 0ebcfa4 commit 47150b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gridplayer/models/resolver_patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class ResolverPattern(BaseModel):
resolver: URLResolver

def is_match(self, url: str):
if self.pattern.strip() == "":
return False

if self.pattern_type == ResolverPatternType.WILDCARD_HOST:
return self._match_wildcard_host(url)
elif self.pattern_type == ResolverPatternType.WILDCARD_URL:
Expand Down

0 comments on commit 47150b6

Please sign in to comment.