New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Payments list doesn't work with pagination parameters #1439
Comments
It was sorted by |
Hey @lsampras I'd like to work on this, can I be assigned to it? |
Ideally we would want it sorted by the Also we use |
Just as a clarification, we want the payments_list to be sorted by created_at in DESC ordered as possibly the front-end pagination depends on it being sorted that way? Also, we would probably sort wrt created_at in the payments intent either after we fetch the "pa" or before we fetch, I don't see how keeping the sorting concurrent will help...unless there is some way to keep the sorting at the same time as fetching payment_attempts |
Yeah, we prefer returning payments list from most recent to least recent...
I meant that the db calls could be moved to a concurrent model as with the current approach we still call database queries in a sequential mode... you can probably sort again once the pa's are fetched or you can keep a map of payment_intent_id <-> payment_attempt & order the received payment_attempts based on the initial list of payment_intents |
Update : I have some code waiting for this issue, it implements async db fetches and uses a map, this has some considerable changes and would like to test before I open a PR. |
@lsampras if the above commit seems fine, I'll open a p. I've tested in local and it returns payment lists from most recent to oldest payments. |
Closing as completed in #1556. |
Context
pay_Ajabdhakjhah
id
whereas the sort ismodified_at
Possible Solutions
modified_at
(which can cause inconsistencies with data lists sincemodified_at
can be changed)The text was updated successfully, but these errors were encountered: