Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Editing screen allows dates that break the listing screen #628

Open
ljm42 opened this issue Apr 12, 2020 · 1 comment
Open

Editing screen allows dates that break the listing screen #628

ljm42 opened this issue Apr 12, 2020 · 1 comment

Comments

@ljm42
Copy link
Contributor

ljm42 commented Apr 12, 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!

@scharc
Copy link

scharc commented Nov 2, 2020

+1

Run in the same error when miss-typed 0018 instead of 2018. T

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants