forked from TabbycatDebate/tabbycat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate the implementations of reserved breaks
This commit creates a new "add_reserve_teams" method and removes the "create_or_update" remark default and the reserve teams in compute_break as having the same effect. It also consolidates the generated DB migrations, and removes the extraneous "REMARK_" prefix on Remark enum values.
- Loading branch information
Showing
6 changed files
with
59 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 28 additions & 9 deletions
37
tabbycat/breakqual/migrations/0007_breakcategory_reserve_size_alter_breakingteam_remark.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,43 @@ | ||
# Generated by Django 5.0.4 on 2024-09-06 17:20 | ||
# Generated by Django 5.0.6 on 2024-09-13 02:43 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('breakqual', '0006_alter_breakcategory_unique_together_and_more'), | ||
("breakqual", "0006_alter_breakcategory_unique_together_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='breakcategory', | ||
name='reserve_size', | ||
field=models.IntegerField(default=0, help_text='Number of reserve teams in this category.', validators=[django.core.validators.MinValueValidator(0)], verbose_name='Reserve size'), | ||
model_name="breakcategory", | ||
name="reserve_size", | ||
field=models.PositiveIntegerField( | ||
default=0, | ||
help_text="Number of reserve teams in this category.", | ||
verbose_name="Reserve size", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name='breakingteam', | ||
name='remark', | ||
field=models.CharField(blank=True, choices=[('C', 'Capped'), ('I', 'Ineligible'), ('D', 'Different break'), ('d', 'Disqualified'), ('t', 'Lost coin toss'), ('w', 'Withdrawn'), ('R', 'Reserve')], help_text="Used to explain why an otherwise-qualified team didn't break", max_length=1, null=True, verbose_name='remark'), | ||
model_name="breakingteam", | ||
name="remark", | ||
field=models.CharField( | ||
blank=True, | ||
choices=[ | ||
("C", "Capped"), | ||
("I", "Ineligible"), | ||
("D", "Different break"), | ||
("d", "Disqualified"), | ||
("t", "Lost coin toss"), | ||
("w", "Withdrawn"), | ||
("R", "Reserve"), | ||
("A", "Absent"), | ||
], | ||
help_text="Used to explain why an otherwise-qualified team didn't break", | ||
max_length=1, | ||
null=True, | ||
verbose_name="remark", | ||
), | ||
), | ||
] |
23 changes: 0 additions & 23 deletions
23
tabbycat/breakqual/migrations/0008_alter_breakcategory_reserve_size_and_more.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters