Always display guest limit input if guestsEnabled
#10492
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This one is a bit of a long story.
restricted
("Guests are only permitted as guests of competitors"). In the other cases (free
andunclear
) we don't display the guest limit setting at all - despite the organizer having selected "Ask about guests"I believe this is an inconsistency in the Competition Form, and we should instead always display the guest limit if the organizer selects "Ask about guests".
There are two levels of solution here:
guests_enabled
is true1. If we're not going to consider guest_limit == 0 as NULL, then we should change the competition form to allow a user to leave a numeric field blank (currently it can start off blank, but they can't replace the 0 once they've put any number in there - ie, an organizer couldn't remove a guest limit once it is set)
guest_limit
to NULL for all open comps withguests_enabled
== true ANDguest_limit
== 0