Add test to verify extra result from pagination is not in after_action callback#2607
Conversation
…ssed to after_action
|
@barnabasJ did I see that you wanted to look into this one? |
I can take a look as well, if you confirm it's a bug |
|
It's hard to say honestly. Like we did in fact read out that additional record from the database. We just aren't actually displaying it in any other meaningful place. And, for instance, in a In an |
|
Currently in any before and after hook you already see the unadjusted limit value: [test/page_test.exs:17: Ash.Test.PageTest.Obj.query_before_action_0_generated_82388214AD28CF5016B4288116CF6022/2]
changeset.page[:limit] #=> 3
[test/page_test.exs:23: Ash.Test.PageTest.Obj.query_after_action_0_generated_2D91811D73EC07F858943B747C418761/3]
changeset.page[:limit] #=> 3
[test/page_test.exs:24: Ash.Test.PageTest.Obj.query_after_action_0_generated_2D91811D73EC07F858943B747C418761/3]
length(results) #=> 4To me the most logical approach would be to filter out the extra fetched result before the |
|
Ah, that's interesting. Well...alright in that case lets update it sure 👍 |
Contributor checklist
Leave anything that you believe does not apply unchecked.