CTFd/ctfcli

Cannot create a point value of 0

Opened this issue · 1 comments

If I have a challenge that I want to have with a value of 0, I get an error saying 'Challenge does not provide a value'

I think this is the offending line and there should be an extra bit of logic to check if the value is 0 or not. Temp solved this by setting values = 1 for the challenges but I dont like that solution.

if not challenge.get("value", False) and challenge.get("type", "standard") != "dynamic":

Probably best to do something like if challenge.get("value", None) is None and ...