fix: PyMISP.get_user_setting method

JakubOnderka-patch-2
Jakub Onderka 2021-10-25 22:51:28 +02:00 committed by GitHub
parent 91f6c1e4b3
commit 74196ee96f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3144,7 +3144,7 @@ class PyMISP:
query: Dict[str, Any] = {'setting': user_setting} query: Dict[str, Any] = {'setting': user_setting}
if user: if user:
query['user_id'] = get_uuid_or_id_from_abstract_misp(user) query['user_id'] = get_uuid_or_id_from_abstract_misp(user)
response = self._prepare_request('POST', 'userSettings/getSetting') response = self._prepare_request('POST', 'userSettings/getSetting', data=query)
user_setting_j = self._check_json_response(response) user_setting_j = self._check_json_response(response)
if not (self.global_pythonify or pythonify) or 'errors' in user_setting_j: if not (self.global_pythonify or pythonify) or 'errors' in user_setting_j:
return user_setting_j return user_setting_j