lhelkkul/PhotoAlbum — Issue #20: If no album exists the welcome page gives an error
Author: taheiska
Created: 2012-02-06 20:00:33+00:00
State: open

ValueError at / empty range for randrange()

Traceback:
File "/usr/lib/pymodules/python2.7/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/home/tomas/Desktop/PhotoAlbum/Albumizer/src/Albumizer/albumizer/views.py" in welcome_page
53. 'random_albums': Album.get_pseudo_random_public(8)
File "/home/tomas/Desktop/PhotoAlbum/Albumizer/src/Albumizer/albumizer/models.py" in get_pseudo_random_public
171. base_album_id = cls._randomizer.randrange(0, max_album_id)
File "/usr/lib/python2.7/random.py" in randrange
192. raise ValueError, "empty range for randrange()"