Skip to content

Commit

Permalink
Allow plays_race to be null.
Browse files Browse the repository at this point in the history
  • Loading branch information
lladdy committed Jun 13, 2022
1 parent 745cada commit 9ff09a3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions aiarena/core/migrations/0052_alter_bot_plays_race.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.9 on 2022-06-13 11:28

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('core', '0051_competition_playable_races'),
]

operations = [
migrations.AlterField(
model_name='bot',
name='plays_race',
field=models.CharField(blank=True, choices=[('T', 'Terran'), ('Z', 'Zerg'), ('P', 'Protoss'), ('R', 'Random')], max_length=1, null=True),
),
]
2 changes: 1 addition & 1 deletion aiarena/core/models/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Bot(models.Model, LockableModelMixin):
blank=True, null=True)
bot_data_md5hash = models.CharField(max_length=32, editable=False, null=True)
bot_data_publicly_downloadable = models.BooleanField(default=False)
plays_race = models.CharField(max_length=1, choices=RACES)
plays_race = models.CharField(max_length=1, choices=RACES, blank=True, null=True)
# todo: rename back to plays_race
plays_race_model = models.ForeignKey(BotRace, on_delete=models.PROTECT, null=True)
type = models.CharField(max_length=32, choices=TYPES)
Expand Down

0 comments on commit 9ff09a3

Please sign in to comment.