// only record failed step if project was undeployed, an update can always
// start from the beginning
if not deployed:
field_generation.get_generated_fields_ref(
project_id, config.root)["failed_step"] = step_num
field_generation.rewrite_generated_fields_back(project_yaml,
config.root)
After Change
project_generated_fields = config.generated_fields["projects"].get(project_id)
if not project_generated_fields:
project_generated_fields = {}
config.generated_fields["projects"][project_id] = project_generated_fields
deployed = False
else:
deployed = "failed_step" not in project_generated_fields