Skip to content

Commit

Permalink
Fix empty enabled_class value.
Browse files Browse the repository at this point in the history
Closes #11.
  • Loading branch information
brocaar committed Aug 2, 2023
1 parent 4850f1a commit 39d3b5c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,11 @@ func migrateDevices() {
}

for _, dev := range devices {
// In v3 this column can be an empty string. In v4 the default value is "A".
if dev.Mode == "" {
dev.Mode = "A"
}

// Device
asDEV := ASDevice{}
err := asDB.Get(&asDEV, "select * from device where dev_eui = $1", dev.DevEUI)
Expand Down

0 comments on commit 39d3b5c

Please sign in to comment.