senaite / senaite.core

Enterprise Open Source Laboratory System (LIMS)
https://senaite.com
GNU General Public License v2.0
254 stars 145 forks source link

Fix non existing department ID is rendered as link in listing #2496

Closed ramonski closed 8 months ago

ramonski commented 8 months ago

Description of the issue/feature this PR addresses

This PR fixes the department ID rendering in the listing view, if no department ID is set. E.g. this might be a side effect when importing setup data from an older instance.

Current behavior before PR

Non existing Department ID is rendered as a link:

Lab Departments — SENAITE LIMS 2024-02-19 1 PM-40-15

Desired behavior after PR is merged

Non existing Department ID is not rendered in the listing

Lab Departments — SENAITE LIMS 2024-02-19 1 PM-41-15

-- I confirm I have tested this PR thoroughly and coded it according to PEP8 and Plone's Python styleguide standards.