Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Default competitor limit to 0 if null #724

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

dunkOnIT
Copy link
Collaborator

@dunkOnIT dunkOnIT commented Nov 4, 2024

After seeing TexasFMCChampionship, I thought all comps without a competitor limit were defaulted to 0.

However, FMCArgentina has a competitor_limit of null in the JSON payload.

As a hotfix for v2, I'm defaulting competitor_limit to 0 if it is nil.

The better approach is what we're now using in v3, which is to query the competitor_limit_enabled property directly. We could expose this in the competition JSON, but given that we want to phase out v2 soon it didn't seem necessary.

@FinnIckler FinnIckler merged commit fec6e54 into thewca:main Nov 4, 2024
1 check passed
@dunkOnIT dunkOnIT deleted the hotfix/comp-limit-0 branch November 4, 2024 10:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants