mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-12 01:26:47 +01:00
Fix: Don't attempt to parse none objects during date searching
This commit is contained in:
parent
cd38c39908
commit
4510902677
2 changed files with 27 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import math
|
|||
import os
|
||||
from collections import Counter
|
||||
from contextlib import contextmanager
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from dateutil.parser import isoparse
|
||||
|
|
@ -371,7 +372,7 @@ class LocalDateParser(English):
|
|||
if isinstance(d, timespan):
|
||||
d.start = self.reverse_timezone_offset(d.start)
|
||||
d.end = self.reverse_timezone_offset(d.end)
|
||||
else:
|
||||
elif isinstance(d, datetime):
|
||||
d = self.reverse_timezone_offset(d)
|
||||
return d
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue