Skip to content

Commit fd509d6

Browse files
committed
Update api_lib.py
1 parent 319256b commit fd509d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sysml_api/api_lib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def delete_project_data(client: SysMLV2Client, proj_id: str, branch_id: str = No
148148
# print(f"Error creating commit 1: {e}")
149149
# return None, None
150150

151-
def commit_to_project(client: SysMLV2Client, proj_id:str, payload:str, commit_msg:str = "default commit message", user_commit_data=None, delete_project_data:bool = False, branch_id=None):
151+
def commit_to_project(client: SysMLV2Client, proj_id:str, payload:str, commit_msg:str = "default commit message", user_commit_data=None, delete_project_data:bool = False, branch_id=None, replace_model:bool = False):
152152
if user_commit_data is None:
153153
commit1_data = {
154154
"@type": "Commit",
@@ -165,7 +165,7 @@ def commit_to_project(client: SysMLV2Client, proj_id:str, payload:str, commit_ms
165165
return None, None
166166

167167
try:
168-
commit1_response = client.create_commit(proj_id, commit1_data, branch_id=branch_id)
168+
commit1_response = client.create_commit(proj_id, commit1_data, branch_id=branch_id, replace=replace_model)
169169
commit1_id = commit1_response.get('@id')
170170
if not commit1_id:
171171
print("\n*** WARNING: Could not extract commit ID ('@id') from response! ***")

0 commit comments

Comments
 (0)