Some documents showing Server Error due to query returning more than one Recent Document

When things don't work as they should.
Post Reply
springpole
Posts: 7
Joined: Tue Dec 15, 2020 1:16 am

Some documents showing Server Error due to query returning more than one Recent Document

Post by springpole »

Version being used;
Version 3.5.5
Build number: v3.5.5-6-g82b4e9bf0c_Tue Jan 5 02:48:06 2021 -0400

When trying to view some documents, it gives the Server Error screen. In the error log, it says that

mayan.apps.documents.models.recently_accessed_document_models.RecentDocument.MultipleObjectsReturned: get() returned more than one RecentDocument -- it returned 2!

I tried to investigate inside the postgres database and found that there are indeed 2 being returned for some users:
double recent document.png
double recent document.png (70.77 KiB) Viewed 273 times
Is it safe to remove one of the entries? Or what else can be done?

Thanks!
User avatar
rosarior
Developer
Developer
Posts: 688
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Some documents showing Server Error due to query returning more than one Recent Document

Post by rosarior »

Yes, it is safe to remove one or both of these entries, they volatile and updated every time users access a document.
Post Reply