Daniel Kantor
commited on
Commit
·
cd1301d
1
Parent(s):
60f8a4b
do not fail when there are no models in requests dataset
Browse files
frontend/src/pages/AddModelPage/components/SubmissionLimitChecker/SubmissionLimitChecker.js
CHANGED
@@ -20,7 +20,13 @@ function SubmissionLimitChecker({ user, children }) {
|
|
20 |
`/api/models/organization/${user.username}/submissions?days=7`
|
21 |
);
|
22 |
if (!response.ok) {
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
const submissions = await response.json();
|
|
|
20 |
`/api/models/organization/${user.username}/submissions?days=7`
|
21 |
);
|
22 |
if (!response.ok) {
|
23 |
+
// TODO: consider making this a failure once the leaderboard
|
24 |
+
// starts getting a lot of traffic
|
25 |
+
console.error("Failed to fetch submission data");
|
26 |
+
setError(false);
|
27 |
+
setReachedLimit(false);
|
28 |
+
|
29 |
+
return
|
30 |
}
|
31 |
|
32 |
const submissions = await response.json();
|