Skip to content

Commit

Permalink
Fix npe and bool type (Azure#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
ninpan-ms authored Aug 13, 2021
1 parent b90bde5 commit 4cc210d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/spring-cloud/azext_spring_cloud/_enterprise.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def _create_empty_app(client, resource_group, service, name):


def _update_app(assign_endpoint=None):
if all(x is None for x in (assign_endpoint)):
if assign_endpoint is None:
return
properties = models.AppResourceProperties(
public=assign_endpoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def validate_git_uri(namespace):


def validate_config_file_patterns(namespace):
_validate_patterns(namespace.config_file_patterns)
if namespace.config_file_patterns:
_validate_patterns(namespace.config_file_patterns)


def validate_acs_patterns(namespace):
Expand Down
4 changes: 2 additions & 2 deletions src/spring-cloud/azext_spring_cloud/service_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ def service_registry_show(cmd, client, service, resource_group):


def service_registry_bind(cmd, client, service, resource_group, app):
_service_registry_bind_or_unbind_app(cmd, client, service, resource_group, app, True)
return _service_registry_bind_or_unbind_app(cmd, client, service, resource_group, app, True)


def service_registry_unbind(cmd, client, service, resource_group, app):
_service_registry_bind_or_unbind_app(cmd, client, service, resource_group, app, False)
return _service_registry_bind_or_unbind_app(cmd, client, service, resource_group, app, False)


def _service_registry_bind_or_unbind_app(cmd, client, service, resource_group, app_name, enabled):
Expand Down

0 comments on commit 4cc210d

Please sign in to comment.