Skip to content

Commit 3ce2e7e

Browse files
authored
Fixes #2041 (#2052)
1 parent 5113300 commit 3ce2e7e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sonar/projects.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,10 +1038,8 @@ def export(self, export_settings: types.ConfigSettings, settings_list: Optional[
10381038
pass
10391039
if contains_ai:
10401040
json_data[_CONTAINS_AI_CODE] = contains_ai
1041-
for s in settings_dict.values():
1042-
if not export_settings.get("INCLUDE_INHERITED", False) and s.inherited:
1043-
continue
1044-
json_data.update(s.to_json())
1041+
with_inherited = export_settings.get("INCLUDE_INHERITED", False)
1042+
json_data["settings"] = [s.to_json() for s in settings_dict.values() if with_inherited or not s.inherited and s.key != "visibility"]
10451043

10461044
except Exception as e:
10471045
util.handle_error(e, f"exporting {str(self)}, export of this project interrupted", catch_all=True)

0 commit comments

Comments
 (0)