Skip to content

Commit

Permalink
Fixing the latest PK for new compression scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkDWilliams committed Feb 13, 2024
1 parent 9ed4d9a commit 992c8b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tr_sys/tr_ars/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@ def latest_pk(req, n):
if actor.agent.name == 'ars-default-agent':
actor_id = actor.id

mesg_list = Message.objects.filter(actor=actor_id).order_by('-timestamp')[:n]
mesg_list = Message.objects.values('actor','timestamp','id').filter(actor=actor_id).order_by('-timestamp')[:n]
for mesg in mesg_list:
response[f'latest_{n}_pks'].append(str(mesg.pk))
response[f'latest_{n}_pks'].append(str(mesg['id']))

return HttpResponse(json.dumps(response, indent=2),
status=200)
Expand Down

0 comments on commit 992c8b8

Please sign in to comment.