Skip to content

Commit 47cb7e8

Browse files
committed
Quality pass
1 parent ff416ea commit 47cb7e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sonar/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
)
117117

118118
API_SET = "settings/set"
119-
API_CREATE = "settings/set"
119+
API_CREATE = API_SET
120120
API_GET = "settings/values"
121121
API_LIST = "settings/list_definitions"
122122
API_NEW_CODE_GET = "new_code_periods/show"
@@ -450,8 +450,8 @@ def set_new_code_period(endpoint: pf.Platform, nc_type: str, nc_value: str, proj
450450
log.debug("Setting new code period for project '%s' branch '%s' to value '%s = %s'", str(project_key), str(branch), str(nc_type), str(nc_value))
451451
try:
452452
if endpoint.is_sonarcloud():
453-
ok = endpoint.post("settings/set", params={"key": "sonar.leak.period.type", "value": nc_type, "project": project_key}).ok
454-
ok = ok and endpoint.post("settings/set", params={"key": "sonar.leak.period", "value": nc_value, "project": project_key}).ok
453+
ok = endpoint.post(API_SET, params={"key": "sonar.leak.period.type", "value": nc_type, "project": project_key}).ok
454+
ok = ok and endpoint.post(API_SET, params={"key": "sonar.leak.period", "value": nc_value, "project": project_key}).ok
455455
else:
456456
ok = endpoint.post(API_NEW_CODE_SET, params={"type": nc_type, "value": nc_value, "project": project_key, "branch": branch}).ok
457457
except HTTPError as e:

0 commit comments

Comments
 (0)