Changeset - e88025895c41
[Not reviewed]
0 1 0
Branko Majic (branko) - 10 years ago 2014-01-05 22:30:23
branko@majic.rs
DJPYD-1: Raise the correct exception in case invalid width is passed to identicon generation view.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
django_pydenticon/views.py
Show inline comments
 
@@ -57,7 +57,7 @@ def image(request, data):
 

	
 
    # Validate the input parameters.
 
    if not isinstance(width, int) or width <= 0:
 
        raise ImproperlyConfigured("Identicon width must be a positive integer.")
 
        raise SuspiciousOperation("Identicon width must be a positive integer.")
 
    if not isinstance(height, int) or height <= 0:
 
        raise SuspiciousOperation("Identicon height must be a positive integer.")
 
    if not all([isinstance(p, int) and p >= 0 for p in padding]) or len(padding) != 4:
0 comments (0 inline, 0 general)