codalab / codabench

Codabench is a flexible, easy-to-use and reproducible benchmarking platform. Check our paper at Patterns Cell Press https://hubs.li/Q01fwRWB0
Apache License 2.0
77 stars 28 forks source link

Manual UI Creation Bug Fix (soome pages not rendering) #1344

Closed bbearce closed 9 months ago

bbearce commented 9 months ago

Issue description

Some pages aren't showing if you are not in a phase.

Issues this PR resolves

A checklist for hand testing

Any relevant files for testing

iris_competition_bundle_vetted.zip

Checklist

ihsaan-ullah commented 9 months ago

What was the actual problem?

bbearce commented 9 months ago

So elusive man. Phases have these two types of statuses. status and is_final_phase. Generally speaking if the phase status is current then everything works out fine. In our case is there is no current phase and there is some JavaScript trying to look up in that case if the is_final_phase of any phase in this challenge is the final phase. That part wasn't working because even if you only have one phase there was no guarantee it was the final. To me it was a back end bug where if a challenge only has one phase it needs to always say that it is the final phase in the data base. It wasn't doing that and it was getting kind of tricky for me to figure out. So instead of hacking the front end to just figure out if there's only one phase and force the issue, I decided to change the back end to adjust the phase's attribute appropriately.

Didayolo commented 9 months ago

@bbearce By default is_final_phase is False? Where is it defined?

ihsaan-ullah commented 9 months ago

First, great work BB.

I think this 'is_final_phase' is not needed. We can remove it from the model and remove this logic. But maybe in another PR. The db design is not what i would do in this case