diff options
author | Marcelo Galigniana <marcelogaligniana@gmail.com> | 2022-10-13 12:09:25 +0200 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-10-13 12:11:39 +0200 |
commit | 9101adc8ba66556c98f3955138d72b3492a6a60c (patch) | |
tree | 5a076ee95e4433c10c7e6f0a1cd7f27dd8489ec3 /django/core | |
parent | 94e7f471c4edef845a4fe5e3160132997b4cca81 (diff) | |
download | django-9101adc8ba66556c98f3955138d72b3492a6a60c.tar.gz |
Removed unused branch in Paginator.validate_number().
Unused since 96cf3656c48f6c42714a70b4546bc42f7b904185.
Diffstat (limited to 'django/core')
-rw-r--r-- | django/core/paginator.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/django/core/paginator.py b/django/core/paginator.py index 568445607e..131ea0f811 100644 --- a/django/core/paginator.py +++ b/django/core/paginator.py @@ -51,10 +51,7 @@ class Paginator: if number < 1: raise EmptyPage(_("That page number is less than 1")) if number > self.num_pages: - if number == 1 and self.allow_empty_first_page: - pass - else: - raise EmptyPage(_("That page contains no results")) + raise EmptyPage(_("That page contains no results")) return number def get_page(self, number): |