mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 03:47:36 -02:30
Remove HipChat notification type
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# Generated by Django 2.2.11 on 2020-05-19 02:27
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
def remove_hipchat_notifications(apps, schema_editor):
|
||||
'''
|
||||
HipChat notifications are no longer in service, remove any that are found.
|
||||
'''
|
||||
Notification = apps.get_model('main', 'Notification')
|
||||
Notification.objects.filter(notification_type='hipchat').delete()
|
||||
NotificationTemplate = apps.get_model('main', 'NotificationTemplate')
|
||||
NotificationTemplate.objects.filter(notification_type='hipchat').delete()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('main', '0115_v370_schedule_set_null'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(remove_hipchat_notifications),
|
||||
migrations.AlterField(
|
||||
model_name='notification',
|
||||
name='notification_type',
|
||||
field=models.CharField(choices=[('email', 'Email'), ('grafana', 'Grafana'), ('irc', 'IRC'), ('mattermost', 'Mattermost'), ('pagerduty', 'Pagerduty'), ('rocketchat', 'Rocket.Chat'), ('slack', 'Slack'), ('twilio', 'Twilio'), ('webhook', 'Webhook')], max_length=32),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='notificationtemplate',
|
||||
name='notification_type',
|
||||
field=models.CharField(choices=[('email', 'Email'), ('grafana', 'Grafana'), ('irc', 'IRC'), ('mattermost', 'Mattermost'), ('pagerduty', 'Pagerduty'), ('rocketchat', 'Rocket.Chat'), ('slack', 'Slack'), ('twilio', 'Twilio'), ('webhook', 'Webhook')], max_length=32),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user