| |
@@ -1497,6 +1497,7 @@
|
| |
user_id=user_obj.id,
|
| |
token_id=token,
|
| |
)
|
| |
+ request.updated_on = datetime.datetime.utcnow()
|
| |
session.add(pr_flag)
|
| |
# Make sure we won't have SQLAlchemy error before we continue
|
| |
session.flush()
|
| |
@@ -3230,7 +3231,9 @@
|
| |
column = model.PullRequest.date_created
|
| |
|
| |
if order_key == "last_updated":
|
| |
- column = model.PullRequest.last_updated
|
| |
+ # We actually want to order on updated_on and not last_updated
|
| |
+ # https://pagure.io/pagure/issue/4464#comment-624915
|
| |
+ column = model.PullRequest.updated_on
|
| |
|
| |
if requestid:
|
| |
query = query.filter(model.PullRequest.id == requestid)
|
| |
Based on https://pagure.io/pagure/issue/4464#comment-624915 , modify the ordering key when we search pull requests with
last_updated
ordering_keyI choose to keep
last_updated
as key to keep backward compatibility