Skip to content

Commit aa8213b

Browse files
committed
fix category map bug
previously, subclasses without an explicit cat_id would overwrite parent's cat_id fixes #102
1 parent eb2a5fc commit aa8213b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pythonbits/submission.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def __init__(cls, name, bases, attrs):
3434
{'mappers': {}, 'types': {}}))
3535

3636
if hasattr(cls, '_cat_id'):
37-
cat_map[cls._cat_id] = cls
37+
if cls._cat_id not in cat_map:
38+
cat_map[cls._cat_id] = cls
3839

3940
def add_mapper(f, ff, fft):
4041
log.debug("{} adding mapper {} for {} ({})",

0 commit comments

Comments
 (0)