Update code to be compatible with py2

This commit is contained in:
beeankha
2019-10-11 10:05:03 -04:00
parent ad89c5eea7
commit fdddba18be

View File

@@ -300,27 +300,21 @@ JobTemplateNotificationDisAssociation.targets.update({
class WorkflowJobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction): class WorkflowJobTemplateNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'workflow_job_templates' resource = 'workflow_job_templates'
action = 'associate' action = 'associate'
targets = dict( targets = NotificationAssociateMixin.targets.copy()
**NotificationAssociateMixin.targets,
**{'approval_notification': [
'notification_templates_approvals',
'notification_template'
]
},
)
class WorkflowJobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction): class WorkflowJobTemplateNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'workflow_job_templates' resource = 'workflow_job_templates'
action = 'disassociate' action = 'disassociate'
targets = dict( targets = NotificationAssociateMixin.targets.copy()
**NotificationAssociateMixin.targets,
**{'approval_notification': [
'notification_templates_approvals', WorkflowJobTemplateNotificationAssociation.targets.update({
'notification_template' 'approval_notification': ['notification_templates_approvals', 'notification_template'],
] })
}, WorkflowJobTemplateNotificationDisAssociation.targets.update({
) 'approval_notification': ['notification_templates_approvals', 'notification_template'],
})
class ProjectNotificationAssociation(NotificationAssociateMixin, CustomAction): class ProjectNotificationAssociation(NotificationAssociateMixin, CustomAction):
@@ -346,29 +340,22 @@ class InventorySourceNotificationDisAssociation(NotificationAssociateMixin, Cust
class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction): class OrganizationNotificationAssociation(NotificationAssociateMixin, CustomAction):
resource = 'organizations' resource = 'organizations'
action = 'associate' action = 'associate'
targets = dict( targets = NotificationAssociateMixin.targets.copy()
**NotificationAssociateMixin.targets,
**{'approval_notification': [
'notification_templates_approvals',
'notification_template'
]
},
)
class OrganizationNotificationDisAssociation(NotificationAssociateMixin, CustomAction): class OrganizationNotificationDisAssociation(NotificationAssociateMixin, CustomAction):
resource = 'organizations' resource = 'organizations'
action = 'disassociate' action = 'disassociate'
targets = dict( targets = NotificationAssociateMixin.targets.copy()
**NotificationAssociateMixin.targets,
**{'approval_notification': [
'notification_templates_approvals',
'notification_template'
]
},
)
OrganizationNotificationAssociation.targets.update({
'approval_notification': ['notification_templates_approvals', 'notification_template'],
})
OrganizationNotificationDisAssociation.targets.update({
'approval_notification': ['notification_templates_approvals', 'notification_template'],
})
class SettingsList(CustomAction): class SettingsList(CustomAction):
action = 'list' action = 'list'
resource = 'settings' resource = 'settings'