mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-24 16:48:55 +00:00
Backend always accept english so UI can send that
This commit is contained in:
1 file changed
+4
-1
@@ -353,7 +353,10 @@ class DateQueryField(serializers.DateField):
|
||||
try:
|
||||
parsed = dateparser.parse(
|
||||
value,
|
||||
locales=settings.DATE_PARSER_LANGUAGES,
|
||||
# The UI always builds English expressions
|
||||
locales=[*settings.DATE_PARSER_LANGUAGES, "en"]
|
||||
if settings.DATE_PARSER_LANGUAGES
|
||||
else None,
|
||||
settings={
|
||||
"PARSERS": ["relative-time"],
|
||||
"RELATIVE_BASE": self.reference_datetime,
|
||||
|
||||
Reference in new issue
Block a user