Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Traceback in patient's samples view when name has special characters #63

Merged
merged 2 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changelog
1.4.0 (unreleased)
------------------

- #63 Fix Traceback in patient's samples view when name has special characters
- #62 Added new name entry mode (firstname + lastname)
- #61 Fix Traceback in listing when fullname is different from sample's
- #60 Fix patient's middlename is not displayed in samples listing
Expand Down
5 changes: 3 additions & 2 deletions src/senaite/patient/browser/patient/samples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-

from bika.lims import api
from senaite.core.browser.samples.view import SamplesView as BaseView
from senaite.patient import messageFactory as _

Expand All @@ -10,8 +11,8 @@ class SamplesView(BaseView):
def __init__(self, context, request):
super(SamplesView, self).__init__(context, request)

self.title = _("Samples of {}").format(
self.context.getFullname())
fullname = self.context.getFullname()
self.title = _("Samples of {}").format(api.safe_unicode(fullname))

mrn = self.context.getMRN()
if mrn:
Expand Down