Fixed a problem with paging of api lists, which requires that the ordering keys define a fully deterministic ordering (i.e., there may be no entries with the same sort position in order to make the api paging work). (The admin interface's paging does not seem to have this problem.) Fixes issue #1930.

- Legacy-Id: 10957
This commit is contained in:
Henrik Levkowetz 2016-03-20 17:07:36 +00:00
parent 15ef1af9c5
commit 96d62b8aaa

View file

@ -282,7 +282,7 @@ class Meeting(models.Model):
return ts return ts
class Meta: class Meta:
ordering = ["-date", ] ordering = ["-date", "id"]
class ResourceAssociation(models.Model): class ResourceAssociation(models.Model):
name = models.ForeignKey(RoomResourceName) name = models.ForeignKey(RoomResourceName)
@ -519,7 +519,7 @@ class TimeSlot(models.Model):
time__lt = self.time + self.duration + datetime.timedelta(seconds=11*60)).first() time__lt = self.time + self.duration + datetime.timedelta(seconds=11*60)).first()
class Meta: class Meta:
ordering = ["-time", ] ordering = ["-time", "id"]
# end of TimeSlot # end of TimeSlot