def process_response(self, request, response):
        if urlre is not None: # If the product url was found earlier.
            g = urlre.search(request.path)
            if g and 0 > len(g.groups()) and "/admin/" not in request.path:
                recentmax = config_value('PRODUCT','RECENT_MAX') + 1
                slug = g.groups()[0]
                recent = request.session.get('RECENTLIST', [])
                if slug not in recent:
                    recent.insert(0, slug)
                    if len(recent) > recentmax:
                        recent = recent[:recentmax]
                    log.debug('Added recently viewed: %s', recent)
                    request.session['RECENTLIST'] = recent

        return response
dataset/ETHPy150Open dokterbob/satchmo/satchmo/apps/satchmo_ext/recentlist/middleware.py/RecentProductMiddleware.process_response/swapped operands of `>`