From 49e67a495bd4776f3a3e0ca5a754572c20c4250c Mon Sep 17 00:00:00 2001 From: Alexander Oblovatniy Date: Sat, 8 Mar 2014 19:02:36 +0200 Subject: [PATCH] Fix difficulty validator. --- il2ds_difficulty/validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/il2ds_difficulty/validators.py b/il2ds_difficulty/validators.py index 9c41261..e10f8a5 100644 --- a/il2ds_difficulty/validators.py +++ b/il2ds_difficulty/validators.py @@ -7,7 +7,7 @@ def validate_difficulty(value): - if not isinstance(value, int): + if not isinstance(value, (int, long)): raise TypeError(_("Difficulty is not an integer")) if value < 0: raise ValueError(_("Difficulty must be a positive number"))