Project

General

Profile

Bug #8977

Can not specify zero rows for tables

Added by Evgeny Novikov about 1 year ago. Updated about 1 month ago.

Status:
Resolved
Priority:
High
Category:
Bridge
Target version:
Start date:
06/20/2018
Due date:
07/11/2019
% Done:

100%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

Description

Here is the exception:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python3.6/site-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/django/utils/decorators.py", line 62, in _wrapper
    return bound_func(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/django/utils/decorators.py", line 58, in bound_func
    return func.__get__(self, type(self))(*args2, **kwargs2)
  File "/home/novikov/work/klever/bridge/tools/profiling.py", line 185, in dispatch
    response = getattr(super(), 'dispatch')(request, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/django/views/generic/base.py", line 150, in get
    context = self.get_context_data(**kwargs)
  File "/home/novikov/work/klever/bridge/marks/views.py", line 118, in get_context_data
    page=self.request.GET.get('page', 1))
  File "/home/novikov/work/klever/bridge/marks/tables.py", line 355, in __init__
    self.values = self.__get_page(page, self.__get_values())
  File "/home/novikov/work/klever/bridge/marks/tables.py", line 591, in __get_page
    values = self.paginator.page(page)
  File "/usr/lib/python3.6/site-packages/django/core/paginator.py", line 65, in page
    number = self.validate_number(number)
  File "/usr/lib/python3.6/site-packages/django/core/paginator.py", line 43, in validate_number
    if number > self.num_pages:
  File "/usr/lib/python3.6/site-packages/django/utils/functional.py", line 36, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/usr/lib/python3.6/site-packages/django/core/paginator.py", line 98, in num_pages
    return int(ceil(hits / float(self.per_page)))
ZeroDivisionError: float division by zero

History

#1

Updated by Evgeny Novikov about 1 year ago

  • Target version deleted (2.0)
  • Priority changed from Urgent to High

Let's postpone it until a new generation of the web interface if it will be implemented ever.

#2

Updated by Vladimir Gratinskiy about 1 month ago

  • % Done changed from 0 to 100
  • Status changed from New to Resolved
  • Due date set to 07/11/2019

Fixed in bridge-3.0.

#3

Updated by Evgeny Novikov about 1 month ago

  • Target version set to 3.0

Also available in: Atom PDF