Skip to content

Commit

Permalink
Handle problem detail case.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdilauro committed Jul 11, 2024
1 parent d76a8a0 commit b09bd79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/palace/manager/api/sip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ def _enforce_patron_location_restriction(
the location associated with the patron exactly matches that of the library.
"""
if (
self.patron_location_restriction is not None
not isinstance(info, ProblemDetail)
and self.patron_location_restriction is not None
and info.get("permanent_location") != self.patron_location_restriction
):
raise ProblemDetailException(PATRON_OF_ANOTHER_LIBRARY)

Check warning on line 369 in src/palace/manager/api/sip/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/palace/manager/api/sip/__init__.py#L369

Added line #L369 was not covered by tests
Expand Down

0 comments on commit b09bd79

Please sign in to comment.