Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
xispa committed Jul 9, 2024
1 parent 6c2f7f7 commit 425edee
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/senaite/referral/adapters/idserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ def __init__(self, context):
self.context = context

def has_custom_type_registered(self):
# get the ID formatting config
config_map = api.get_bika_setup().getIDFormatting()
for config in config_map:
portal_type = config["portal_type"]
"""Returns whether an entry for AnalysisRequestFromShipment portal
type exists in ID server formatting config
"""
bs = api.get_bika_setup()
formatting = bs.getIDFormatting()
for config in formatting:
portal_type = config.get("portal_type", "")
if portal_type.lower() == SAMPLE_FROM_SHIPMENT_ID.lower():
return True
return False
Expand Down

0 comments on commit 425edee

Please sign in to comment.