diff options
Diffstat (limited to 'core/models')
-rw-r--r-- | core/models/caves.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/models/caves.py b/core/models/caves.py index 70a13ae..0b3aa1d 100644 --- a/core/models/caves.py +++ b/core/models/caves.py @@ -549,6 +549,10 @@ class PersonTrip(TroggleModel): logbook_entry = models.ForeignKey(LogbookEntry,on_delete=models.CASCADE) is_logbook_entry_author = models.BooleanField(default=False) + class Meta: + ordering = ('-personexpedition',) + #order_with_respect_to = 'personexpedition' + def persontrip_next(self): futurePTs = PersonTrip.objects.filter(personexpedition = self.personexpedition, logbook_entry__date__gt = self.logbook_entry.date).order_by('logbook_entry__date').all() if len(futurePTs) > 0: |