Added MEPIR and UPRT mix profile types

This commit is contained in:
2025-11-28 11:14:07 +01:00
parent 7a392df8ad
commit 65444e786b
3 changed files with 23 additions and 2 deletions

View File

@@ -69,4 +69,5 @@ class MissionProfileAdmin(ImportMixin, AdminActionFormsMixin, admin.ModelAdmin):
def assigned_aircrafts(self, obj: MissionProfile) -> SafeText: def assigned_aircrafts(self, obj: MissionProfile) -> SafeText:
if not obj.aircrafts: if not obj.aircrafts:
return SafeText("") return SafeText("")
return SafeText("/".join(ac.markings for ac in obj.aircrafts.all())) return SafeText("/".join(ac.markings for ac in obj.aircrafts.all()))

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.2.8 on 2025-11-28 10:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('flightslot', '0023_missionprofile_aircrafts'),
]
operations = [
migrations.AlterField(
model_name='missionprofile',
name='mtype',
field=models.CharField(choices=[('OTHER', 'OTHER'), ('CHK', 'CHK_6M'), ('PPL', 'PPL'), ('IR', 'IR'), ('MEP', 'MEP'), ('MEP_IR', 'MEP_IR'), ('CPL', 'CPL'), ('UPRT', 'UPRT'), ('FI', 'FI'), ('PC', 'PC')], default='PPL', verbose_name='Mission Type'),
),
]

View File

@@ -7,13 +7,15 @@ from ..models.aircrafts import Aircraft
class MissionType(models.TextChoices): class MissionType(models.TextChoices):
OTHER = "OTHER", _("OTHER") OTHER = "OTHER", _("OTHER")
CHK = "CHK", _("CHK_6M")
PPL = "PPL", _("PPL") PPL = "PPL", _("PPL")
IR = "IR", _("IR") IR = "IR", _("IR")
MEP = "MEP", _("MEP") MEP = "MEP", _("MEP")
MEP_IR = "MEP_IR", _("MEP_IR")
CPL = "CPL", _("CPL") CPL = "CPL", _("CPL")
UPRT = "UPRT", _("UPRT")
FI = "FI", _("FI") FI = "FI", _("FI")
PC = "PC", _("PC") PC = "PC", _("PC")
CHK = "CHK", _("CHK_6M")
class MissionProfile(models.Model): class MissionProfile(models.Model):
id = models.AutoField( id = models.AutoField(