This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously the [deployment failed](#2334 (comment)): ``` failed to overwrite default of old field type with None (string): failed to set default value of enum type to None (string): value: None (string) is not part of allowed enum values: [Done Duplicate Incomplete Description Can not Reproduce Deferred Won't Fix Out of Date Verified] file: spacetemplate/importer/repository.go line: 91 ``` We've updated the resolution enum to have a new value and that is also the new default. That new value didn't exist in the old enum type but we tried to make it the new default for the old type anyways. That didn't work because the `FieldType.SetDefault()` implementation for enums checks if the given value is part of the allowed enum values. The overall intention is to check if too enums are the same but ignore the default value. That is why we temporarily make both defaults the same before we call `FieldType.Equal()`. With this change we simply reverse the assignment of the new default to the old type. Instead we temporarily assign the old default to the new type. The result is that a call to `FieldType.Equal()` will return true.
- Loading branch information