[FIX] web_analytics: test mock does not have a proper wbeclient instance

As a quick workaround: double-check for the presence
of a client in the openerp instance. Should probably
be replaced by a proper mock in the web tests

bzr revid: odo@openerp.com-20130130174334-mysskhhmvurj64fg
This commit is contained in:
Olivier Dony 2013-01-30 18:43:34 +01:00
parent 7ed95d2224
commit b1560fb788
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ openerp.web_analytics = function(instance) {
// the call to bind_events() may have been delayed in some embed
// cases, and when that happens we can skip the push, as the
// proper one will be done when bind_event is eventually called.
if (instance.client.tracker) {
if (instance.client && instance.client.tracker) {
instance.client.tracker._push_customvars();
}
});