Skip to content

Commit

Permalink
Merge branch 'release/1.0.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Jan 22, 2025
2 parents a460a33 + e02fdb9 commit 7d3f0e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion edc_lab/admin/modeladmin_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from django.contrib import admin
from django.core.exceptions import ObjectDoesNotExist
from django.utils.html import format_html
from django.utils.safestring import mark_safe
from edc_constants.constants import UUID_PATTERN, YES
from edc_visit_tracking.utils import get_related_visit_model_cls

Expand Down Expand Up @@ -46,7 +47,10 @@ def requisition(obj=None):
return format_html(
'<span style="color:red;">{}</span>', obj.requisition_identifier
)
return format_html('<span style="color:red;">not drawn</span>')
return format_html(
"{html}",
html=mark_safe('<span style="color:red;">not drawn</span>'), # nosec B703, B308
)

def formfield_for_foreignkey(self, db_field, request, **kwargs):
if db_field.name == "panel":
Expand Down
3 changes: 2 additions & 1 deletion edc_lab/lab/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from django.core.exceptions import ObjectDoesNotExist
from django.urls.base import reverse
from django.utils.html import format_html
from django.utils.safestring import mark_safe

from ..constants import VERIFIED

Expand Down Expand Up @@ -71,7 +72,7 @@ def add_box(self, box=None, manifest_item_identifier=None):
"Item is already in a manifest. See "
'<a href="{}" class="alert-link">'
"{}</a>",
href,
mark_safe(href), # nosec B703, B308
manifest_identifier,
)
messages.error(self.request, message)
Expand Down

0 comments on commit 7d3f0e4

Please sign in to comment.