Thing Copy: Fix channel uid of copied Thing (#2984)

Fixes #2977.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
pull/2982/head
jimtng 2025-01-08 08:22:06 +10:00 committed by GitHub
parent 438854f482
commit 331ec6b79e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -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({