diff --git a/lib/cuckoo/common/web_utils.py b/lib/cuckoo/common/web_utils.py index e471e0847dd..a9b0a9ff0a6 100644 --- a/lib/cuckoo/common/web_utils.py +++ b/lib/cuckoo/common/web_utils.py @@ -1663,11 +1663,9 @@ def perform_search( def force_int(value): try: - value = int(value) + return int(value) except Exception: - value = 0 - finally: - return value + return 0 def force_bool(value): diff --git a/web/submission/views.py b/web/submission/views.py index 4b081e7affb..3d3819c0dcd 100644 --- a/web/submission/views.py +++ b/web/submission/views.py @@ -286,15 +286,6 @@ def __call__(self, func): return self.decorator(func) -def force_int(value): - try: - value = int(value) - except Exception: - value = 0 - finally: - return value - - @conditional_login_required(login_required, settings.WEB_AUTHENTICATION) def index(request, task_id=None, resubmit_hash=None): remote_console = False