From 4d116e81c82af42a241a55d44edc05b904f483db Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Tue, 31 May 2022 08:24:37 -0700 Subject: [PATCH] Eliminate orgUnitPath encoding (#1527) --- src/gam/gapi/directory/orgunits.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/gam/gapi/directory/orgunits.py b/src/gam/gapi/directory/orgunits.py index 6be28893..ef0b404d 100644 --- a/src/gam/gapi/directory/orgunits.py +++ b/src/gam/gapi/directory/orgunits.py @@ -373,17 +373,20 @@ def makeOrgUnitPathRelative(path): def encodeOrgUnitPath(path): - if path.find('+') == -1 and path.find('%') == -1: - return path - encpath = '' - for c in path: - if c == '+': - encpath += '%2B' - elif c == '%': - encpath += '%25' - else: - encpath += c - return encpath +# 6.22 - This method no longer works. +# % no longer needs encoding and + is handled incorrectly in API with or without encoding + return path +# if path.find('+') == -1 and path.find('%') == -1: +# return path +# encpath = '' +# for c in path: +# if c == '+': +# encpath += '%2B' +# elif c == '%': +# encpath += '%25' +# else: +# encpath += c +# return encpath def getOrgUnitItem(orgUnit, pathOnly=False, absolutePath=True):