not dumb error log message

This commit is contained in:
ticvac 2025-01-07 17:49:16 +01:00
parent 9c4c60765e
commit a97071cd03

View file

@ -60,10 +60,10 @@ def get_app_list(self, request, app_label=None):
try: # na macu nefunguje locale.strxfrm :-/ proto je tu try except block try: # na macu nefunguje locale.strxfrm :-/ proto je tu try except block
for app in app_list: for app in app_list:
app['models'].sort(key=lambda x: locale.strxfrm(x['name'].lower())) app['models'].sort(key=lambda x: locale.strxfrm(x['name'].lower()))
except OSError: except OSError as e:
# locale.strxfrm nefunguje na macu... :-/ -> neprovede se řazení # locale.strxfrm nefunguje na macu... :-/ -> neprovede se řazení
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
logger.error('locale.strxfrm nefunguje na macu... :-/ -> neprovede se řazení') logger.error(e)
return app_list return app_list