HumanBrainProject / hbp-validation-framework

Apache License 2.0
5 stars 12 forks source link

Error with listing of results #249

Closed appukuttan-shailesh closed 5 years ago

appukuttan-shailesh commented 5 years ago

lesser problem: GET https://validation-staging.brainsimulation.eu/results/ fails (Error 400)

"You need to give 'order' argument. Here are the options: 'test', 'model', 'model_instance', 'test_code', 'score_type', '' "

It would be nice if it could take default value as " " (no value)

bigger problem: with order specified GET https://validation-staging.brainsimulation.eu/results/?order=model still fails (Error 500)

AttributeError at /results/ 'list' object has no attribute 'uuid'

And with more parameters, we get yet another error, e.g.: GET https://validation-staging.brainsimulation.eu/results/?order=&model_version_id=c76598b4-1b8c-4cbe-8de9-9248882b2e7a we get Error 500:

TypeError at /results/ 'ValidationResult' object is not iterable*

apdavison commented 5 years ago

GET https://validation-staging.brainsimulation.eu/results/?order=model still fails (Error 500)

I was surprised to see this, as this was working previously, but it seems that somehow we have at least one duplicate model (which shouldn't happen), and that causes the problem. I've now "fixed" the problem - in such cases, the first model is used, and an error is written to the server log, so we can track down the duplicate. (Still need to figure out how the duplicate(s) got created).

Having fixed that, I don't see an error for the last URL

appukuttan-shailesh commented 5 years ago

Yes, it works now.