Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ Are you sure you want to disable auto-sync and rollback application '${this.prop
if (confirmed) {
if (needDisableRollback) {
const update = JSON.parse(JSON.stringify(application)) as appModels.Application;
update.spec.syncPolicy = {automated: null};
update.spec.syncPolicy.automated = null;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at this point in code (see needDisableRollback) we know that update.spec.syncPolicy.automated is set to something not null. this is why we can set it to null, while leaving the rest of syncPolicy (syncOptions) unchanged.

await services.applications.update(update);
}
await services.applications.rollback(this.props.match.params.name, this.getAppNamespace(), revisionHistory.id);
Expand Down
Loading