jose-lpa / django-tracking-analyzer

User actions tracking and analytics for Django sites :bar_chart:
GNU General Public License v3.0
96 stars 32 forks source link

This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' #22

Closed vocationeers closed 4 years ago

vocationeers commented 4 years ago

I am trying django tracking-analyzer for the first time and encountered the above error when ttrying ot access the admin site of tracking-analyzer.

The admin site worked fine as long as no tracking data was in the database. Once I created the first entry I got the a "(1235, "This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'")" when accessing the admin page of the analyzer.

Error is thrown in tracking_analyzer\admin.py in changelist_view, line 203

        current_page = response.context_data['cl'].page_num
        current_pks = response.context_data['cl'].paginator.page(
            current_page + 1).object_list.values_list('pk', flat=True)
        current_results = get_requests_count(
            Tracker.objects.filter(pk__in=current_pks))
       for item in current_results: …                             <-- ERROR HERE
            item['date'] = '{date}T{hour:02d}:{minute:02d}'.format(
                date=item.pop('date'),
                hour=item.pop('hour'),
                minute=item.pop('minute')
            )
jose-lpa commented 4 years ago

This should have been fixed in PR #18 by @EnriqueSoria :+1: