Skip to content

Commit

Permalink
{RDBMS} az postgres flexible-server list: adding a null check to see …
Browse files Browse the repository at this point in the history
…if resource group passed is already null (#30304)

Co-authored-by: Matthew Boentoro <[email protected]>
  • Loading branch information
mattboentoro and Matthew Boentoro authored Nov 12, 2024
1 parent 5f63260 commit e758252
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/azure-cli/azure/cli/command_modules/rdbms/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,8 +824,15 @@ def _pg_storage_type_validator(storage_type, auto_grow, high_availability, geo_r


def check_resource_group(resource_group_name):
# check if rg is already null originally
if (not resource_group_name):
return False

# replace single and double quotes with empty string
resource_group_name = resource_group_name.replace("'", '')
resource_group_name = resource_group_name.replace('"', '')

# check if rg is empty after removing quotes
if (not resource_group_name):
return False
return True
Expand Down

0 comments on commit e758252

Please sign in to comment.