Skip to content

Commit

Permalink
fix: 🐛 check if original exist
Browse files Browse the repository at this point in the history
  • Loading branch information
frack113 committed Nov 15, 2024
1 parent 41ec5ba commit 7dc6d92
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sigma/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,10 +584,18 @@ def to_regex(self, custom_escaped: str = "") -> "SigmaRegularExpression":
)

def upper(self) -> "SigmaString":
return SigmaString(self.original.upper())
if self.original:
return SigmaString(self.original.upper())
else:
original= self.to_plain()
return SigmaString(original.upper())

def lower(self) -> "SigmaString":
return SigmaString(self.original.lower())
if self.original:
return SigmaString(self.original.lower())
else:
original= self.to_plain()
return SigmaString(original.lower())


class SigmaCasedString(SigmaString):
Expand Down

0 comments on commit 7dc6d92

Please sign in to comment.