[FIX] website_links: Crash when loading data more than a week old
Steps to reproduce the bug: - Create old click data in the `link_tracker_click` table or change your computer's current date to two weeks in the future. - Go to the stats page of the link tracker Bug: Backtrace on the stats of the link tracker. opw:2321377 closes odoo/odoo#58113 X-original-commit: 875aeb5c55b96fc3f7d76fc67d56f60df8453ec3 Signed-off-by: Simon Goffin (sig) <sig@openerp.com> Signed-off-by: backspac <backspac@users.noreply.github.com>
This commit is contained in:
@@ -179,6 +179,13 @@ msgstr ""
|
||||
msgid "Newest"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_links
|
||||
#. openerp-web
|
||||
#: code:addons/website_links/static/src/js/website_links_charts.js:0
|
||||
#, python-format
|
||||
msgid "No data"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_links
|
||||
#: model_terms:ir.ui.view,arch_db:website_links.create_shorten_url
|
||||
msgid "Recently Used"
|
||||
|
||||
@@ -104,7 +104,7 @@ var PieChart = publicWidget.Widget.extend({
|
||||
labels: labels,
|
||||
datasets: [{
|
||||
data: data,
|
||||
label: this.data[0].key,
|
||||
label: this.data.length > 0 ? this.data[0].key : _t('No data'),
|
||||
}]
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user