From c679b0d2e601ade5a5967c904c2ff651b20bea0d Mon Sep 17 00:00:00 2001
From: George Katsikas <giorgakis.katsikas@gmail.com>
Date: Wed, 18 Oct 2023 14:15:04 +0000
Subject: [PATCH] fix submission sorting for multiples on same date

---
 scipost_django/submissions/models/submission.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scipost_django/submissions/models/submission.py b/scipost_django/submissions/models/submission.py
index 6c0a228b7..839536304 100644
--- a/scipost_django/submissions/models/submission.py
+++ b/scipost_django/submissions/models/submission.py
@@ -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."""
-- 
GitLab