aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api
diff options
context:
space:
mode:
authorGravatar RohanJnr <[email protected]>2021-05-19 13:13:57 +0530
committerGravatar RohanJnr <[email protected]>2021-05-19 13:13:57 +0530
commitd061ab1c138c7cecf8d138226990bdcf0761a5db (patch)
treec46609c3d3687e3c943f9e5004e3eb5914561918 /pydis_site/apps/api
parentMerge pull request #505 from python-discord/poetry-and-python-3.9 (diff)
Add active field to OffTopicChannelName model.
Diffstat (limited to 'pydis_site/apps/api')
-rw-r--r--pydis_site/apps/api/migrations/0070_auto_20210519_0545.py23
-rw-r--r--pydis_site/apps/api/models/bot/off_topic_channel_name.py7
2 files changed, 29 insertions, 1 deletions
diff --git a/pydis_site/apps/api/migrations/0070_auto_20210519_0545.py b/pydis_site/apps/api/migrations/0070_auto_20210519_0545.py
new file mode 100644
index 00000000..dbd7ac91
--- /dev/null
+++ b/pydis_site/apps/api/migrations/0070_auto_20210519_0545.py
@@ -0,0 +1,23 @@
+# Generated by Django 3.0.14 on 2021-05-19 05:45
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('api', '0069_documentationlink_validators'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='offtopicchannelname',
+ name='active',
+ field=models.BooleanField(default=True, help_text='Whether or not this name should be considered for naming channels.'),
+ ),
+ migrations.AlterField(
+ model_name='offtopicchannelname',
+ name='used',
+ field=models.BooleanField(default=False, help_text='Whether or not this name has already been used during this rotation.'),
+ ),
+ ]
diff --git a/pydis_site/apps/api/models/bot/off_topic_channel_name.py b/pydis_site/apps/api/models/bot/off_topic_channel_name.py
index 403c7465..582c069e 100644
--- a/pydis_site/apps/api/models/bot/off_topic_channel_name.py
+++ b/pydis_site/apps/api/models/bot/off_topic_channel_name.py
@@ -18,7 +18,12 @@ class OffTopicChannelName(ModelReprMixin, models.Model):
used = models.BooleanField(
default=False,
- help_text="Whether or not this name has already been used during this rotation",
+ help_text="Whether or not this name has already been used during this rotation.",
+ )
+
+ active = models.BooleanField(
+ default=True,
+ help_text="Whether or not this name should be considered for naming channels."
)
def __str__(self):