chore: fix __str__ output of Schedule object

parent 3472aa69
......@@ -69,6 +69,9 @@ class Schedule(models.Model):
Flight_Cost = models.IntegerField(default=0)
Flight_Code = models.ForeignKey(Flight, on_delete=models.CASCADE)
def __str__(self):
return str(self.Sched_Code)
class Booking(models.Model):
Booking_ID = models.AutoField(primary_key=True, editable=False, unique=True)
......@@ -131,6 +134,9 @@ class Booking_Sched(models.Model):
Booking_ID = models.ForeignKey(Booking, on_delete=models.CASCADE)
Sched_Code = models.ForeignKey(Schedule, on_delete=models.CASCADE)
def __str__(self):
return 'Booking No. ' + str(self.Booking_ID) + ' - Sched Code: ' + str(self.Sched_Code)
class Crew_Member(models.Model):
Employee_ID = models.AutoField(primary_key=True, editable=False, unique=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment