default to last 2 chars of topic for tid

closes #120
This commit is contained in:
Jan-Piet Mens 2016-04-22 10:11:10 +02:00
parent 790543252d
commit 2f8e1190ca

View File

@ -68,7 +68,7 @@
d['fulldate'] = dt.format("DD MMM YYYY HH:mm:ss"); d['fulldate'] = dt.format("DD MMM YYYY HH:mm:ss");
d['addr'] = d['addr'] || '(' + d['lat'] + ',' + d['lon'] + ')'; d['addr'] = d['addr'] || '(' + d['lat'] + ',' + d['lon'] + ')';
d['cc'] = d['cc'] || '__'; d['cc'] = d['cc'] || '__';
d['tid'] = d['tid'] || '__'; d['tid'] = d['tid'] || d.topic.substr(d.topic.length - 2, d.topic.length);
upsert(d); upsert(d);
} }