Browse Source

fix: Fix latest commit (#8952)

Sort commits by `timestamp` not `date_added`, which isn't a valid attribute

This is a follow up to #8903 which introduced the incorrect change
Lyn Nagara 6 years ago
parent
commit
696f0f9444
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/sentry/models/release.py

+ 1 - 1
src/sentry/models/release.py

@@ -330,7 +330,7 @@ class Release(Model):
         """
 
         # Sort commit list in reverse order
-        commit_list.sort(key=lambda commit: commit.get('date_added'), reverse=True)
+        commit_list.sort(key=lambda commit: commit.get('timestamp'), reverse=True)
 
         # TODO(dcramer): this function could use some cleanup/refactoring as its a bit unwieldly
         from sentry.models import (