Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time comparison to 'never' fails for admin update notification #304

Closed
sheagcraig opened this issue Dec 6, 2018 · 1 comment
Closed
Assignees
Labels

Comments

@sheagcraig
Copy link
Contributor

Describe the bug
Sal UI dies trying to compare 'never' to a float epoch time.

Traceback:

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
39. response = get_response(request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)

File "/home/docker/sal/server/views.py" in index
79. context.update(utils.check_version())

File "/home/docker/sal/server/utils.py" in check_version
170. if current_time > next_notify_date:

Exception Type: TypeError at /
Exception Value: '>' not supported between instances of 'float' and 'str'

Example values:
current_time: 1544108664.4966092
next_notify_date: 'never'

To Reproduce
Steps to reproduce the behavior:

  1. Possibly not an issue on other versions; certainly an issue on the 4.0 branch...
  2. New version is available.
  3. "never" is chosen as the remind me option.
  4. Try to view something.

Expected behavior
You're not nagged again until the next version and the site works correctly.

Server (please complete the following information):

  • Docker, py3/sal 4 branch
@sheagcraig sheagcraig self-assigned this Dec 6, 2018
@sheagcraig sheagcraig added the bug label Dec 6, 2018
@sheagcraig
Copy link
Contributor Author

Fixed by #305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant