diff options
| -rw-r--r-- | pydis_site/apps/api/migrations/0051_offtopicchannelname_used.py | 18 | ||||
| -rw-r--r-- | pydis_site/apps/api/models/bot/off_topic_channel_name.py | 5 | 
2 files changed, 23 insertions, 0 deletions
diff --git a/pydis_site/apps/api/migrations/0051_offtopicchannelname_used.py b/pydis_site/apps/api/migrations/0051_offtopicchannelname_used.py new file mode 100644 index 00000000..74836d8c --- /dev/null +++ b/pydis_site/apps/api/migrations/0051_offtopicchannelname_used.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.11 on 2020-03-30 10:24 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + +    dependencies = [ +        ('api', '0050_remove_infractions_active_default_value'), +    ] + +    operations = [ +        migrations.AddField( +            model_name='offtopicchannelname', +            name='used', +            field=models.BooleanField(default=False, help_text='Show is channel already used as channel name in this round.'), +        ), +    ] 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 29280c27..3345754d 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 @@ -16,6 +16,11 @@ class OffTopicChannelName(ModelReprMixin, models.Model):          help_text="The actual channel name that will be used on our Discord server."      ) +    used = models.BooleanField( +        default=False, +        help_text="Show is channel already used as channel name in this round." +    ) +      def __str__(self):          """Returns the current off-topic name, for display purposes."""          return self.name  |