Skip to content
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

Use Token in list deletion and use the default value when a max param is not properly given #275

Open
qifeng-bai opened this issue Sep 8, 2023 · 1 comment
Assignees

Comments

@qifeng-bai
Copy link
Contributor

qifeng-bai commented Sep 8, 2023

1,List deletion still send API Key to delete the related record in Collection service

2, http://lists.ala.org.au/public/speciesLists?isThreatened=eq%3Atrue%27&max=25%27&order=asc%27&q=%27&sort=itemsCount%27

Generated

groovy.lang.MissingMethodException: No signature of method: static java.lang.Math.min() is applicable for argument types: (null, Integer) values: [null, 1000]
Possible solutions: min(int, int), min(double, double), min(float, float), min(long, long), find(), max(int, int)

This error was introduced since the value of max passed max=25%27 in was not an integer

Fix:
If parsing Max fails, then use the default 25 as max

@qifeng-bai qifeng-bai self-assigned this Sep 8, 2023
@qifeng-bai qifeng-bai changed the title Using Token in list deletion Use Token in list deletion and use the default value when a max param is not properly given Sep 11, 2023
@qifeng-bai
Copy link
Contributor Author

qifeng-bai commented Sep 12, 2023

Test:

by given a wrong value toparam: max, e.g. max = testinto
https://lists-test.ala.org.au/public/speciesLists?isThreatened=eq%3Atrue%27&max=test&order=asc%27&q=&sort=itemsCount

It should return the list which max is set to the default value 25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant