#628·paperless

Editing screen allows dates that break the listing screen

Author: ljm42Created Apr 12, 2020Updated Nov 2, 2020

When editing a document the interface allows you to input a date of 04/11/0020: image

However, if you then try to view the document listing page you get an error:

AttributeError at /admin/documents/document/
'NoneType' object has no attribute 'year'
Request Method:	GET
Request URL:	http://server/admin/documents/document/
Django Version:	2.0.13
Exception Type:	AttributeError
Exception Value:	
'NoneType' object has no attribute 'year'
Exception Location:	/usr/lib/python3.8/site-packages/django/contrib/admin/templatetags/admin_list.py in <listcomp>, line 400
Python Executable:	/usr/bin/python3
Python Version:	3.8.2
Python Path:	
['/usr/src/paperless/src',
 '/usr/lib/python38.zip',
 '/usr/lib/python3.8',
 '/usr/lib/python3.8/lib-dynload',
 '/usr/lib/python3.8/site-packages']
Server time:	Sat, 11 Apr 2020 18:43:15 -0700

This looks similar to issue #414

Would it make sense to determine the min/max dates that the listing page supports, and then ensure the editing page doesn't allow you to enter dates beyond those?

Thanks!

Source: the-paperless-project/paperless