Skip to content

Commit 7d62f8c

Browse files
committed
feat: python-helper and globals versions updated
1 parent c116b84 commit 7d62f8c

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎python_framework/api/src/service/ExceptionHandler.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(self,
6868
):
6969
self.timeStamp = DateTimeHelper.now()
7070
self.status = HttpStatus.map(DEFAULT_STATUS if ObjectHelper.isNone(status) else status).enumValue
71-
self.message = message if ObjectHelper.isNotEmpty(message) and StringHelper.isNotBlank(message) else DEFAULT_MESSAGE if 500 <= self.status else self.status.enumName
71+
self.message = message if ObjectHelper.isNotEmpty(message) and StringHelper.isNotBlank(message) else DEFAULT_MESSAGE if 500 <= self.status else StringHelper.toParagraphCase(self.status.enumName)
7272
self.verb = verb if ObjectHelper.isNotNone(verb) else self.getRequestVerb()
7373
self.url = url if ObjectHelper.isNotNone(url) else self.getRequestUrl()
7474
self.logMessage = DEFAULT_LOG_MESSAGE if ObjectHelper.isNone(logMessage) or StringHelper.isBlank(logMessage) else logMessage

‎python_framework/api/src/util/AuditoryUtil.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def safellyGetCurrentSession(apiInstance=None, service=None, sessionClass=None):
2424
currentSession = SessionManager.getCurrentSession(sessionClass=sessionClass, apiInstance=apiInstance if ObjectHelper.isNone(service) else service.globals.api)
2525
except Exception as exception:
2626
log.debug(safellyGetCurrentSession, f'Not possible to get current session. Returning "{currentSession}" by default', exception=exception, muteStackTrace=True)
27-
return StaticConverter.getValueOrDefault(currentSession, {})
27+
return StaticConverter.getValueOrDefault(currentSession, {} if ObjectHelper.isNone(sessionClass) else sessionClass())
2828

2929

3030
def getSessionIdentity(apiInstance=None, service=None):
@@ -47,7 +47,7 @@ def safellyGetCurrentApiKey(apiInstance=None, service=None, apiKeyClass=None):
4747
currentApiKey = ApiKeyManager.getCurrentApiKey(apiKeyClass=apiKeyClass, apiInstance=apiInstance if ObjectHelper.isNone(service) else service.globals.api)
4848
except Exception as exception:
4949
log.debug(safellyGetCurrentApiKey, f'Not possible to get current api key. Returning "{currentApiKey}" by default', exception=exception, muteStackTrace=True)
50-
return StaticConverter.getValueOrDefault(currentApiKey, {})
50+
return StaticConverter.getValueOrDefault(currentApiKey, {} if ObjectHelper.isNone(apiKeyClass) else apiKeyClass())
5151

5252

5353
def getApiKeyIdentity(apiInstance=None, service=None):
@@ -70,7 +70,7 @@ def safellyGetCurrentAthentication(apiInstance=None, service=None, securityClass
7070
currentAthentication = SecurityManager.getCurrentUser(securityClass=securityClass, apiInstance=apiInstance if ObjectHelper.isNone(service) else service.globals.api)
7171
except Exception as exception:
7272
log.debug(safellyGetCurrentAthentication, f'Not possible to get current user. Returning "{currentAthentication}" by default', exception=exception, muteStackTrace=True)
73-
return StaticConverter.getValueOrDefault(currentAthentication, {})
73+
return StaticConverter.getValueOrDefault(currentAthentication, {} if ObjectHelper.isNone(securityClass) else securityClass())
7474

7575

7676
def getAthenticationIdentity(apiInstance=None, service=None):

‎setup.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
sudo ln -s /usr/local/bin/pipX.Y /usr/bin/pip
1616
''')
1717

18-
VERSION = '0.4.34'
18+
VERSION = '0.4.35'
1919

2020
NAME = 'python_framework'
2121
PACKAGE_NAME = NAME
@@ -69,8 +69,8 @@
6969
'Flask-Swagger-Ui==3.36.0',
7070
'psycopg2-binary<3.0,>=2.8.6',
7171
'SQLAlchemy==1.4.25',
72-
'globals<1.0,>=0.3.34',
73-
'python-helper<1.0,>=0.3.55',
72+
'globals<1.0,>=0.3.35',
73+
'python-helper<1.0,>=0.3.57',
7474
'Flask-APScheduler==1.12.2',
7575
'requests<3.0,>=2.26.0',
7676
'werkzeug<3.0,>=2.2.2'

0 commit comments

Comments
 (0)