Skip to content

History View Fixes

Tim Metzner requested to merge history_view_fix into main

Various fixes to the History Widget & View.

In the History Widget, small device lendings would show up with name "None". Now, they show up with the name of the device.

Old:

image

New:

image

The version history referred to the wrong object's primary key. It is supposed to refer to a Version pk, but instead referred to the object pk, causing random results.

As an example, here is the breadcrumbs for the Version 30 details.

image

After clicking on "Verlauf" ("History"), you get to this page.

image

You would expect one of these links to bring you back to Version 30, however...

Old:

image

New:

image

Lendings could not be viewed. This is because the History Detail and History List views implement breadcrumbs, but Lendings don't implement a "lending-set" nor do they have a standard View class to look at them (get_absolute_url). Those things were not added for this MR, but at least the error is being caught now and the breadcrumbs are just not displayed for Lendings.

Old:

image

New:

image

Edited by Tim Metzner

Merge request reports