Skip to content

Commit b98af33

Browse files
committed
fix: Simplify the logic
info Edition calls from server will not have true / false or CE / EE
1 parent a1698b4 commit b98af33

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

lib/utils/util.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -688,24 +688,15 @@ def find_delimiter_in(value):
688688

689689

690690
def convert_edition_to_shortform(edition):
691-
"""Convert edition to shortform Enterprise or Community or N/E"""
691+
"""Convert edition to shortform Enterprise or Community or Federal or N/E"""
692692

693-
if (
694-
edition.lower() in ["enterprise", "true", "ee"]
695-
or "enterprise" in edition.lower()
696-
):
693+
if "enterprise" in edition.lower():
697694
return "Enterprise"
698695

699-
if (
700-
edition.lower() in ["community", "false", "ce"]
701-
or "community" in edition.lower()
702-
):
696+
if "community" in edition.lower():
703697
return "Community"
704698

705-
if (
706-
edition.lower() in ["federal", "false", "ee"]
707-
or "federal" in edition.lower()
708-
):
699+
if "federal" in edition.lower():
709700
return "Federal"
710701

711702
return "N/E"

0 commit comments

Comments
 (0)