Skip to content

Commit 4a6a9b2

Browse files
author
Jon Walker
authored
Merge pull request #20 from jameskochubasas/master
CAS Publish Model Fix with force
2 parents 525a203 + 1013229 commit 4a6a9b2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sasctl/tasks.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def publish_model(model, destination, code=None, max_retries=60,
251251
def submit_request():
252252
# Submit a publishing request
253253
if code is None:
254-
publish_req = mm.publish_model(model, destination, **kwargs)
254+
publish_req = mm.publish_model(model, destination, force=replace, **kwargs)
255255
else:
256256
publish_req = mp.publish_model(model, destination,
257257
code=code, **kwargs)
@@ -265,6 +265,9 @@ def submit_request():
265265
# Submit and wait for status
266266
job = submit_request()
267267

268+
if job.state.lower() == 'completed' and job.destination.destinationType != 'microAnalyticService':
269+
return request_link(job,'self')
270+
268271
# If MAS publish failed and replace=True, attempt to delete the module
269272
# and republish
270273
if job.state.lower() == 'failed' and replace and \

0 commit comments

Comments
 (0)