mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-15 00:14:38 +00:00
Allow disabling query segmentation
This commit is contained in:
parent
a8c0f517ae
commit
cb08fc409f
@ -37,9 +37,11 @@ class PiwikQueryReportEventBase(PiwikQueryReportBase):
|
||||
self.start_date = start_date
|
||||
self.end_date = end_date
|
||||
|
||||
def call(self, **query_params):
|
||||
def call(self, segmentation_enabled=True, **query_params):
|
||||
if segmentation_enabled:
|
||||
query_params['segmentation'] = self.get_segmentation()
|
||||
return super(PiwikQueryReportEventBase, self).call(module='API', date=[self.start_date, self.end_date],
|
||||
segmentation=self.get_segmentation(), **query_params)
|
||||
**query_params)
|
||||
|
||||
def get_segmentation(self):
|
||||
segmentation = {'customVariablePageName1': ('==', 'Conference'),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user