SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit c679b0d2 authored by George Katsikas's avatar George Katsikas :goat:
Browse files

fix submission sorting for multiples on same date

parent aa8e34c8
No related branches found
No related tags found
No related merge requests found
......@@ -756,7 +756,7 @@ class Submission(models.Model):
def thread_full(self):
"""Return all Submissions in the database in this thread."""
return Submission.objects.filter(thread_hash=self.thread_hash).order_by(
"-submission_date", "-preprint"
"-submission_date", "preprint"
)
@property
......@@ -765,7 +765,7 @@ class Submission(models.Model):
return (
Submission.objects.public()
.filter(thread_hash=self.thread_hash)
.order_by("-submission_date", "-preprint")
.order_by("-submission_date", "preprint")
)
@cached_property
......@@ -776,7 +776,7 @@ class Submission(models.Model):
@cached_property
def other_versions(self):
"""Return other Submissions in the database in this thread."""
return self.get_other_versions().order_by("-submission_date", "-preprint")
return self.get_other_versions().order_by("-submission_date", "preprint")
def get_other_versions(self):
"""Return queryset of other Submissions with this thread."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment