Skip to content

Commit 6b863d7

Browse files
add slug collision error
1 parent 122c168 commit 6b863d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

catalog/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ def games() -> pd.DataFrame:
6363

6464
# Add all the games from families
6565
for slug, game in family_games().items():
66+
# Throw an error if there's a slug collision between family games and file-based games
67+
if slug in records:
68+
raise ValueError(
69+
f"Slug collision: {slug} is present in both file-based and "
70+
"family games."
71+
)
6672
records.append(
6773
{
6874
"Game": slug,

0 commit comments

Comments
 (0)