Device management crashes on new NAV installation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Network Administration Visualized |
Fix Released
|
Medium
|
Stein Magnus Jodal |
Bug Description
Found this while testing the upcoming 3.3.0 release candidate. Probably,
device management is trying to retrieve the first alerthist entry to
determine which years to populate a dropdown box with. But, being a fresh
installation, there are no alerthist entries.
Traceback:
Mod_python error: "PythonHandler nav.web.
Traceback (most recent call last):
File "/usr/lib/
in HandlerDispatch
result = object(req)
File "/usr/local/
line 70, in handler
output = history(req)
File "/usr/local/
line 71, in history
date_
AttributeError: 'NoneType' object has no attribute 'year'
[http://
Changed in nav: | |
milestone: | trunk → v3.3 |
Originator: NO
Fixed in r4227:
Device Management:
* Aggregate functions like min() always returns a row, so one must check
if the
value is NULL instead of checking for >0 rows. Somehow, the NULL value
in
PostgreSQL translates to something not-None in Python, which has no
type,
string representation but is True. This was solved by letting PSQL
decide if
the returned value was true or not. (Closes: SF#1797010)