Skip to content

Commit

Permalink
explicitly check for DataElement before reference value
Browse files Browse the repository at this point in the history
  • Loading branch information
wetzelj committed Sep 11, 2023
1 parent add691c commit 66926c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deid/dicom/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import re

from pydicom.dataset import Dataset
from pydicom.dataset import Dataset, DataElement

from deid.logger import bot

Expand Down Expand Up @@ -152,7 +152,7 @@ def empty(self, field):
return len(content) == 0

# This is the case of a data element
elif not isinstance(content, str):
elif isinstance(content, DataElement):
content = content.value

if content == "":
Expand Down

0 comments on commit 66926c1

Please sign in to comment.