Removing the default setting of code to None I think means that if neither override_code nor code_field are set, the code will die.