Fix adding sensor widget to main page#3394
Conversation
|
lunkwill42
left a comment
There was a problem hiding this comment.
The patch looks absolutely fine, but I don't seem to be able to reproduce the mentioned bug, and there's no mention of how to do it...
If you find a sensor that does not have |
My test data contains 11998 sensors without an Still not sure what I'm looking for... (this is on the latest |
This only applies to boolean sensors, for all others it works as expected nav/python/nav/web/navlets/__init__.py Line 431 in ac4924c |
Some sensors have no alert_type specified, which would make this fail for boolean sensors
ac4924c to
c517896
Compare
|
Indeed, I suspected this in the end. I'll try to make a mental note of amending the changelog to that effect :) |
I already added that caveat to the news fragment 🙂 |



Some sensors have no alert_type specified, which would make this fail. Luckily we already have specified the property
alert_type_classwhich we can simply use here.https://github.com/Uninett/nav/blob/master/python/nav/models/manage.py#L2609-L2613
Found this bug while working on #3387.