He got promoted because he was replaceable. This is an art-form to cultivate if you want to be promoted yet be good at your job.
data = data if data is not None else []
(is) data = data if data else []
(is) data = data or []
which means you either did: data = []
(or) data = None
The line above is wrong - you always define your variables to match your structures properly during your __init__.