diff --git a/zerver/decorator.py b/zerver/decorator.py index 7af50d19e8..d4fcd2fe28 100644 --- a/zerver/decorator.py +++ b/zerver/decorator.py @@ -477,13 +477,6 @@ def to_non_negative_int(x): raise ValueError("argument is negative") return x -def to_non_negative_float(x): - # type: (float) -> float - x = float(x) - if x < 0: - raise ValueError("argument is negative") - return x - def flexible_boolean(boolean): # type: (text_type) -> bool """Returns True for any of "1", "true", or "True". Returns False otherwise.""" diff --git a/zerver/views/messages.py b/zerver/views/messages.py index cc0d4b6017..d35dabaca1 100644 --- a/zerver/views/messages.py +++ b/zerver/views/messages.py @@ -13,7 +13,7 @@ from zerver.lib.str_utils import force_bytes from zerver.decorator import authenticated_api_view, authenticated_json_post_view, \ has_request_variables, REQ, JsonableError, \ - to_non_negative_int, to_non_negative_float + to_non_negative_int from django.utils.html import escape as escape_html from zerver.lib import bugdown from zerver.lib.actions import recipient_for_emails, do_update_message_flags, \