Skip to content

Commit

Permalink
fix: Simplify the logic
Browse files Browse the repository at this point in the history
info Edition calls from server will not have true / false or CE / EE
  • Loading branch information
a-spiker committed Oct 22, 2024
1 parent a1698b4 commit b98af33
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions lib/utils/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,24 +688,15 @@ def find_delimiter_in(value):


def convert_edition_to_shortform(edition):
"""Convert edition to shortform Enterprise or Community or N/E"""
"""Convert edition to shortform Enterprise or Community or Federal or N/E"""

if (
edition.lower() in ["enterprise", "true", "ee"]
or "enterprise" in edition.lower()
):
if "enterprise" in edition.lower():
return "Enterprise"

if (
edition.lower() in ["community", "false", "ce"]
or "community" in edition.lower()
):
if "community" in edition.lower():
return "Community"

if (
edition.lower() in ["federal", "false", "ee"]
or "federal" in edition.lower()
):
if "federal" in edition.lower():
return "Federal"

return "N/E"
Expand Down

0 comments on commit b98af33

Please sign in to comment.