[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:
parent
7ed95d2224
commit
b1560fb788
|
@ -280,7 +280,7 @@ openerp.web_analytics = function(instance) {
|
||||||
// the call to bind_events() may have been delayed in some embed
|
// the call to bind_events() may have been delayed in some embed
|
||||||
// cases, and when that happens we can skip the push, as the
|
// cases, and when that happens we can skip the push, as the
|
||||||
// proper one will be done when bind_event is eventually called.
|
// 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();
|
instance.client.tracker._push_customvars();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue