Show Hour building only at ATPL or DL (volo) students
This commit is contained in:
@@ -8,6 +8,7 @@ class CourseTypes(models.TextChoices):
|
||||
PPL = "PPL", _("PPL")
|
||||
ATPL = "ATPL", _("ATPL")
|
||||
DISTANCE = "DL", _("DISTANCE")
|
||||
DISTANCE_VOLO = "DL_VOLO", _("DISTANCE_VOLO")
|
||||
OTHER = "OTHER",_("OTHER")
|
||||
|
||||
class Course(models.Model):
|
||||
|
||||
@@ -117,6 +117,8 @@ class HourBuildingLegFlight(HourBuildingLegBase):
|
||||
def save(self, *args, **kwargs):
|
||||
self.departure = self.departure.upper().strip()
|
||||
self.destination = self.destination.upper().strip()
|
||||
if self.pax:
|
||||
self.pax = " ".join(c.capitalize() for c in self.pax.split())
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
Reference in New Issue
Block a user