Skip to content

Commit

Permalink
Merge pull request #580 from NCATSTranslator/fixingLatestPks
Browse files Browse the repository at this point in the history
Fixing the latest PK for new compression scheme
  • Loading branch information
MarkDWilliams authored Feb 13, 2024
2 parents c87cf54 + 992c8b8 commit 6446803
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 6446803

Please sign in to comment.