v8.1.0.1: Fix method ordering in cred_views.py error handling

Reorder `_is_editing_shared_ssh` and `_check_is_correct_group` calls to ensure correct error handling sequence. This change improves code readability and maintains the intended error-checking flow in the credential edit process.
pull/399/head
Aidaho 1 month ago
parent 96f9f71a2b
commit d7f699d376

@ -174,12 +174,12 @@ class CredView(MethodView):
group_id = SupportClass.return_group_id(body)
try:
self._check_is_correct_group(cred_id)
self._is_editing_shared_ssh(cred_id, g.user_params['group_id'])
except Exception as e:
return roxywi_common.handler_exceptions_for_json_data(e, '')
try:
self._is_editing_shared_ssh(cred_id, g.user_params['group_id'])
self._check_is_correct_group(cred_id)
except Exception as e:
return roxywi_common.handler_exceptions_for_json_data(e, '')

Loading…
Cancel
Save