From 9258ffa478ecf528a50d416004bd64f7407f6dfc Mon Sep 17 00:00:00 2001 From: Yuwei Zhou Date: Thu, 18 Oct 2018 10:52:30 +0800 Subject: [PATCH] Fix auto scale create with fix date without recurrence (#47186) * Fix auto scale create with fix date without recurrence * fix indent --- lib/ansible/modules/cloud/azure/azure_rm_autoscale.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_autoscale.py b/lib/ansible/modules/cloud/azure/azure_rm_autoscale.py index 8c3b38c2fe4..e285768cfb3 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_autoscale.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_autoscale.py @@ -550,8 +550,9 @@ class AzureRMAutoScale(AzureRMModuleBase): schedule=(RecurrentSchedule(time_zone=p.get('recurrence_timezone'), days=p.get('recurrence_days'), hours=p.get('recurrence_hours'), - minutes=p.get('recurrence_mins'))) - if p.get('recurrence_frequency') else None)) for p in self.profiles or []] + minutes=p.get('recurrence_mins')))) + if p.get('recurrence_frequency') and p['recurrence_frequency'] != 'None' else None) + for p in self.profiles or []] notifications = [AutoscaleNotification(email=EmailNotification(**n), webhooks=[WebhookNotification(service_uri=w) for w in n.get('webhooks') or []])