Clears tags and changes template name when cloning template (#28708) (#28715)

This commit is contained in:
Catherine Liu 2019-01-14 13:34:16 -07:00 committed by GitHub
parent 8c764e73bf
commit 3b1e971a72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,6 +25,8 @@ export const WorkpadTemplates = compose(
// Clone workpad given an id
cloneWorkpad: props => workpad => {
workpad.id = getId('workpad');
workpad.name = `Untitled Workpad - ${workpad.name}`;
workpad.tags = undefined;
return workpadService
.create(workpad)
.then(() => props.router.navigateTo('loadWorkpad', { id: workpad.id, page: 1 }))