Fix require_active_version getting overrided

This commit is contained in:
BrunoQuaresma 2024-04-30 18:55:48 +00:00
parent b6a2fe4b93
commit 425d55bfc2
3 changed files with 2 additions and 3 deletions

View File

@ -232,7 +232,7 @@ type UpdateTemplateMeta struct {
// RequireActiveVersion mandates workspaces built using this template
// use the active version of the template. This option has no
// effect on template admins.
RequireActiveVersion bool `json:"require_active_version"`
RequireActiveVersion bool `json:"require_active_version,omitempty"`
// DeprecationMessage if set, will mark the template as deprecated and block
// any new workspaces from using this template.
// If passed an empty string, will remove the deprecated message, making

View File

@ -1320,7 +1320,7 @@ export interface UpdateTemplateMeta {
readonly time_til_dormant_autodelete_ms?: number;
readonly update_workspace_last_used_at: boolean;
readonly update_workspace_dormant_at: boolean;
readonly require_active_version: boolean;
readonly require_active_version?: boolean;
readonly deprecation_message?: string;
readonly disable_everyone_group_access: boolean;
readonly max_port_share_level?: WorkspaceAgentPortShareLevel;

View File

@ -234,7 +234,6 @@ export const TemplateScheduleForm: FC<TemplateScheduleForm> = ({
allow_user_autostop: form.values.allow_user_autostop,
update_workspace_last_used_at: form.values.update_workspace_last_used_at,
update_workspace_dormant_at: form.values.update_workspace_dormant_at,
require_active_version: false,
disable_everyone_group_access: false,
});
};