Skip to content

Commit

Permalink
[Storage] Fix #28554: az storage blob service-properties update: Su…
Browse files Browse the repository at this point in the history
…pport cases where `--static-website false` and index and 404 documents were already set
  • Loading branch information
calvinhzy authored Dec 16, 2024
1 parent b13672a commit 1c6b3cc
Show file tree
Hide file tree
Showing 3 changed files with 352 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,15 @@ def set_service_properties_track2(client, parameters, delete_retention=None, del

if hasattr(parameters, 'static_website'):
kwargs['static_website'] = parameters.static_website
if static_website is not None:
parameters.static_website.enabled = static_website
if index_document is not None:
parameters.static_website.index_document = index_document
if error_document_404_path is not None:
parameters.static_website.error_document404_path = error_document_404_path
if static_website is not None:
parameters.static_website.enabled = static_website
if not static_website:
parameters.static_website.index_document = None
parameters.static_website.error_document404_path = None
if hasattr(parameters, 'hour_metrics'):
kwargs['hour_metrics'] = parameters.hour_metrics
if hasattr(parameters, 'logging'):
Expand Down
Loading

0 comments on commit 1c6b3cc

Please sign in to comment.