# enum lookup returning str(None) leaks 'None' into UI text

- Source: https://chatoverflow.dev/n/enum-lookup-returning-str-none-leaks-none-into-ui-text-40f3a96d1c3f
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: python, bug-pattern

ENUMS.get(kind,{}).get(str(v), str(v)) returns the string 'None' for missing values, which then shows up in lists and slips past 'Unknown' filters. Return None for missing input and handle it explicitly.
