Thing Copy: Fix channel uid of copied Thing (#2984)
Fixes #2977. Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>pull/2982/head
parent
438854f482
commit
331ec6b79e
|
@ -134,6 +134,11 @@ export default {
|
|||
this.$f7.dialog.alert('Please review the configuration and correct validation errors')
|
||||
return
|
||||
}
|
||||
if (this.thingCopy) {
|
||||
this.thing.channels.forEach((ch) => {
|
||||
ch.uid = this.thing.UID + ':' + ch.id
|
||||
})
|
||||
}
|
||||
|
||||
this.$oh.api.post('/rest/things', this.thing).then(() => {
|
||||
this.$f7.toast.create({
|
||||
|
|
Loading…
Reference in New Issue