Skip to content

Commit b8b61c9

Browse files
committed
Remove perms field for objects with no permission
1 parent 06b33a7 commit b8b61c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sonar/util/common_json_helper.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626

2727
def convert_common_fields(json_data: dict[str, Any], with_permissions: bool = True) -> dict[str, Any]:
28+
if "permissions" in json_data and json_data["permissions"] is None:
29+
json_data.pop("permissions")
2830
if with_permissions and "permissions" in json_data:
2931
json_data["permissions"] = utilities.perms_to_list(json_data["permissions"])
3032
for perm in json_data["permissions"]:

0 commit comments

Comments
 (0)