diff --git a/Changes b/Changes index b8341f05..db520f24 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,9 @@ +2.039019 - 2018-03-23 + + [BUG FIXES] + + * fix device search SQL error (reported by bhuddah) + 2.039018 - 2018-03-22 [ENHANCEMENTS] diff --git a/lib/App/Netdisco/DB/ResultSet/Device.pm b/lib/App/Netdisco/DB/ResultSet/Device.pm index d1ad652c..1d755de3 100644 --- a/lib/App/Netdisco/DB/ResultSet/Device.pm +++ b/lib/App/Netdisco/DB/ResultSet/Device.pm @@ -46,11 +46,11 @@ sub with_times { '+columns' => { uptime_age => \("replace(age(timestamp 'epoch' + uptime / 100 * interval '1 second', " ."timestamp '1970-01-01 00:00:00-00')::text, 'mon', 'month')"), - first_seen_stamp => \"to_char(creation, 'YYYY-MM-DD HH24:MI')", + first_seen_stamp => \"to_char(me.creation, 'YYYY-MM-DD HH24:MI')", last_discover_stamp => \"to_char(last_discover, 'YYYY-MM-DD HH24:MI')", last_macsuck_stamp => \"to_char(last_macsuck, 'YYYY-MM-DD HH24:MI')", last_arpnip_stamp => \"to_char(last_arpnip, 'YYYY-MM-DD HH24:MI')", - since_first_seen => \"extract(epoch from (age(now(), creation)))", + since_first_seen => \"extract(epoch from (age(now(), me.creation)))", since_last_discover => \"extract(epoch from (age(now(), last_discover)))", since_last_macsuck => \"extract(epoch from (age(now(), last_macsuck)))", since_last_arpnip => \"extract(epoch from (age(now(), last_arpnip)))",