Skip to content

Commit a632de7

Browse files
committed
Fix
1 parent b5d37fa commit a632de7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sonar/projects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,8 +1002,8 @@ def export(self, export_settings: types.ConfigSettings, settings_list: Optional[
10021002
if contains_ai:
10031003
json_data[_CONTAINS_AI_CODE] = contains_ai
10041004
with_inherited = export_settings.get("INCLUDE_INHERITED", False)
1005-
json_data["settings"] = {k: s.to_json() for k, s in settings_dict.values() if with_inherited or not s.inherited and s.key != "visibility"}
1006-
return phelp.convert_projects_json(json_data)
1005+
json_data["settings"] = {k: s.to_json() for k, s in settings_dict.items() if with_inherited or not s.inherited and s.key != "visibility"}
1006+
return phelp.convert_project_json(json_data)
10071007

10081008
except Exception as e:
10091009
traceback.print_exc()

sonar/util/project_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
)
6565

6666

67-
def old_to_new_json_one(old_json: dict[str, Any]) -> dict[str, Any]:
67+
def convert_project_json(old_json: dict[str, Any]) -> dict[str, Any]:
6868
"""Converts the sonar-config projects old JSON report format for a single project to the new one"""
6969
new_json = old_json.copy()
7070
if "permissions" in old_json:
@@ -82,5 +82,5 @@ def convert_projects_json(old_json: dict[str, Any]) -> dict[str, Any]:
8282
"""Converts the sonar-config projects old JSON report format to the new one"""
8383
new_json = old_json.copy()
8484
for k, v in new_json.items():
85-
new_json[k] = old_to_new_json_one(v)
85+
new_json[k] = convert_project_json(v)
8686
return util.dict_to_list(new_json, "key")

0 commit comments

Comments
 (0)