chirpstack / chirpstack-v3-to-v4

Utility to migate ChirpStack v3 data into ChirpStack v4.
MIT License
8 stars 6 forks source link

enabled_class is wrongly migrated if sensor was not yet activated before in v3 #18

Closed augusthjerrild closed 11 months ago

augusthjerrild commented 11 months ago

After a migration from v3 to v4, when I look into my chirpstack postgres DB for an IoT-device, enabled_class is just one space char. So it looks like the check for an empty string doesn't catch it, since the string is not empty but " ". When I change the script myself to check for an " " (a space char), then it works.

Can this fix be made in a new release :-)? Thx for an awesome migration repo either way!

brocaar commented 11 months ago

Thanks, the above commit should fix this.