Skip to content

Commit

Permalink
Thing Copy: Fix channel uid of copied Thing (#2984)
Browse files Browse the repository at this point in the history
Fixes #2977.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
(cherry picked from commit 331ec6b)
  • Loading branch information
jimtng authored and florian-h05 committed Jan 7, 2025
1 parent e580e1e commit 6289ac9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 6289ac9

Please # to comment.