Skip to content

Commit 5276775

Browse files
committed
Reapply fix for #740
1 parent ff4d934 commit 5276775

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

kaggle/api/kaggle_api_extended.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class KaggleApi:
312312
'unlaunched_community'
313313
]
314314
valid_competition_categories = [
315-
'all', 'featured', 'research', 'recruitment', 'gettingStarted', 'masters',
315+
'all', 'unspecified', 'featured', 'research', 'recruitment', 'gettingStarted', 'masters',
316316
'playground'
317317
]
318318
valid_competition_sort_by = [
@@ -750,7 +750,10 @@ def competitions_list(self,
750750

751751
if category:
752752
if category not in self.valid_competition_categories:
753-
raise ValueError('Invalid category specified. Valid options are ' +
753+
if category == 'all':
754+
category = 'unspecified'
755+
else:
756+
raise ValueError('Invalid category specified. Valid options are ' +
754757
str(self.valid_competition_categories))
755758
category = self.lookup_enum(HostSegment, category)
756759

0 commit comments

Comments
 (0)