Skip to content

Commit

Permalink
allow use_given_order for languages
Browse files Browse the repository at this point in the history
  • Loading branch information
whalebot-helmsman committed Oct 7, 2021
1 parent 41f9478 commit fab5e91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dateparser/date.py
Expand Up @@ -358,8 +358,8 @@ def __init__(self, languages=None, locales=None, region=None, try_previous_local
raise TypeError("use_given_order argument must be a boolean (%r given)"
% type(use_given_order))

if not locales and use_given_order:
raise ValueError("locales must be given if use_given_order is True")
if not locales and not languages and use_given_order:
raise ValueError("locales or locales must be given if use_given_order is True")

check_settings(settings)

Expand Down

0 comments on commit fab5e91

Please sign in to comment.