chore: remove editor_label field from ConstraintName model (#3783)
This commit is contained in:
parent
994e6c378a
commit
966e1c806a
|
@ -6323,7 +6323,6 @@
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"desc": "",
|
"desc": "",
|
||||||
"editor_label": "<i class=\"bi bi-person\"></i>{count}",
|
|
||||||
"is_group_conflict": false,
|
"is_group_conflict": false,
|
||||||
"name": "Person must be present",
|
"name": "Person must be present",
|
||||||
"order": 4,
|
"order": 4,
|
||||||
|
@ -6336,7 +6335,6 @@
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"desc": "Indicates other WGs the chairs also lead or will be active participants in",
|
"desc": "Indicates other WGs the chairs also lead or will be active participants in",
|
||||||
"editor_label": "<i class=\"bi bi-person-plus\"></i>",
|
|
||||||
"is_group_conflict": true,
|
"is_group_conflict": true,
|
||||||
"name": "Chair conflict",
|
"name": "Chair conflict",
|
||||||
"order": 8,
|
"order": 8,
|
||||||
|
@ -6349,7 +6347,6 @@
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"desc": "",
|
"desc": "",
|
||||||
"editor_label": "<span class=\"encircled\">2</span>",
|
|
||||||
"is_group_conflict": true,
|
"is_group_conflict": true,
|
||||||
"name": "Conflicts with (secondary)",
|
"name": "Conflicts with (secondary)",
|
||||||
"order": 2,
|
"order": 2,
|
||||||
|
@ -6362,7 +6359,6 @@
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"desc": "",
|
"desc": "",
|
||||||
"editor_label": "<span class=\"encircled\">3</span>",
|
|
||||||
"is_group_conflict": true,
|
"is_group_conflict": true,
|
||||||
"name": "Conflicts with (tertiary)",
|
"name": "Conflicts with (tertiary)",
|
||||||
"order": 3,
|
"order": 3,
|
||||||
|
@ -6375,7 +6371,6 @@
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"desc": "",
|
"desc": "",
|
||||||
"editor_label": "<span class=\"encircled\">1</span>",
|
|
||||||
"is_group_conflict": true,
|
"is_group_conflict": true,
|
||||||
"name": "Conflicts with",
|
"name": "Conflicts with",
|
||||||
"order": 1,
|
"order": 1,
|
||||||
|
@ -6388,7 +6383,6 @@
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"desc": "Indicates WGs with which key participants (presenter, secretary, etc.) may overlap",
|
"desc": "Indicates WGs with which key participants (presenter, secretary, etc.) may overlap",
|
||||||
"editor_label": "<i class=\"bi bi-key\"></i>",
|
|
||||||
"is_group_conflict": true,
|
"is_group_conflict": true,
|
||||||
"name": "Key participant conflict",
|
"name": "Key participant conflict",
|
||||||
"order": 10,
|
"order": 10,
|
||||||
|
@ -6401,7 +6395,6 @@
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"desc": "Indicates WGs with a related technology or a closely related charter",
|
"desc": "Indicates WGs with a related technology or a closely related charter",
|
||||||
"editor_label": "<i class=\"bi bi-link\"></i>",
|
|
||||||
"is_group_conflict": true,
|
"is_group_conflict": true,
|
||||||
"name": "Technology overlap",
|
"name": "Technology overlap",
|
||||||
"order": 9,
|
"order": 9,
|
||||||
|
@ -6414,7 +6407,6 @@
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"desc": "",
|
"desc": "",
|
||||||
"editor_label": "Δ",
|
|
||||||
"is_group_conflict": false,
|
"is_group_conflict": false,
|
||||||
"name": "Preference for time between sessions",
|
"name": "Preference for time between sessions",
|
||||||
"order": 6,
|
"order": 6,
|
||||||
|
@ -6427,7 +6419,6 @@
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"desc": "",
|
"desc": "",
|
||||||
"editor_label": "<i class=\"bi bi-calendar\"></i>",
|
|
||||||
"is_group_conflict": false,
|
"is_group_conflict": false,
|
||||||
"name": "Can't meet within timerange",
|
"name": "Can't meet within timerange",
|
||||||
"order": 5,
|
"order": 5,
|
||||||
|
@ -6440,7 +6431,6 @@
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"desc": "",
|
"desc": "",
|
||||||
"editor_label": "<i class=\"bi bi-skip-end\"></i>",
|
|
||||||
"is_group_conflict": false,
|
"is_group_conflict": false,
|
||||||
"name": "Request for adjacent scheduling with another WG",
|
"name": "Request for adjacent scheduling with another WG",
|
||||||
"order": 7,
|
"order": 7,
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
# Generated by Django 2.2.27 on 2022-03-11 07:55
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
def forward(apps, schema_editor):
|
||||||
|
pass # nothing to do, row will be dropped
|
||||||
|
|
||||||
|
|
||||||
|
def reverse(apps, schema_editor):
|
||||||
|
# Restore data from when this migration was written. Dumped with:
|
||||||
|
# >>> from pprint import pp
|
||||||
|
# >>> from ietf.name.models import ConstraintName
|
||||||
|
# >>> pp(list(ConstraintName.objects.values_list('slug', 'editor_label')))
|
||||||
|
ConstraintName = apps.get_model('name', 'ConstraintName')
|
||||||
|
for slug, editor_label in [
|
||||||
|
('conflict', '<span class="encircled">1</span>'),
|
||||||
|
('conflic2', '<span class="encircled">2</span>'),
|
||||||
|
('conflic3', '<span class="encircled">3</span>'),
|
||||||
|
('bethere', '<i class="fa fa-user-o"></i>{count}'),
|
||||||
|
('timerange', '<i class="fa fa-calendar-o"></i>'),
|
||||||
|
('time_relation', 'Δ'),
|
||||||
|
('wg_adjacent', '<i class="fa fa-step-forward"></i>'),
|
||||||
|
('chair_conflict', '<i class="fa fa-gavel"></i>'),
|
||||||
|
('tech_overlap', '<i class="fa fa-rocket"></i>'),
|
||||||
|
('key_participant', '<i class="fa fa-key"></i>'),
|
||||||
|
]:
|
||||||
|
ConstraintName.objects.filter(slug=slug).update(editor_label=editor_label)
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('name', '0038_disuse_offagenda_and_reserved'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(forward, reverse)
|
||||||
|
]
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Generated by Django 2.2.27 on 2022-03-11 10:05
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('name', '0039_depopulate_constraintname_editor_label'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='constraintname',
|
||||||
|
name='editor_label',
|
||||||
|
),
|
||||||
|
]
|
|
@ -85,7 +85,6 @@ class TimeSlotTypeName(NameModel):
|
||||||
class ConstraintName(NameModel):
|
class ConstraintName(NameModel):
|
||||||
"""conflict, conflic2, conflic3, bethere, timerange, time_relation, wg_adjacent"""
|
"""conflict, conflic2, conflic3, bethere, timerange, time_relation, wg_adjacent"""
|
||||||
penalty = models.IntegerField(default=0, help_text="The penalty for violating this kind of constraint; for instance 10 (small penalty) or 10000 (large penalty)")
|
penalty = models.IntegerField(default=0, help_text="The penalty for violating this kind of constraint; for instance 10 (small penalty) or 10000 (large penalty)")
|
||||||
editor_label = models.CharField(max_length=64, blank=True, help_text="Very short label for producing warnings inline in the sessions in the schedule editor.")
|
|
||||||
is_group_conflict = models.BooleanField(default=False, help_text="Does this constraint capture a conflict between groups?")
|
is_group_conflict = models.BooleanField(default=False, help_text="Does this constraint capture a conflict between groups?")
|
||||||
class TimerangeName(NameModel):
|
class TimerangeName(NameModel):
|
||||||
"""(monday|tuesday|wednesday|thursday|friday)-(morning|afternoon-early|afternoon-late)"""
|
"""(monday|tuesday|wednesday|thursday|friday)-(morning|afternoon-early|afternoon-late)"""
|
||||||
|
|
Loading…
Reference in a new issue