Skip to content

Commit

Permalink
Ids 779 remove active directory lookup from ro crate gener (#1)
Browse files Browse the repository at this point in the history
* remove active directory lookup

* remove active directory lookup

* black changes to removed active directory lookup
  • Loading branch information
JLoveUOA authored Jun 4, 2024
1 parent c838e5e commit e600f38
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 147 deletions.
Binary file modified examples_for_test/print_lab_test/sampledata.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions src/mt_api/apiconfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from requests.models import PreparedRequest

from src.mt_api.api_consts import CONNECTION__HOSTNAME
from src.user_lookup.user_lookup import lookup_user

from .mt_consts import UOA

Expand Down Expand Up @@ -206,11 +205,6 @@ def create_person_object(self, upi: str) -> Person:
users_stub = "user/?username="
name = upi
email = ""
ldap_data = lookup_user(upi=upi)
if ldap_data is not None:
first_name, last_name, email = ldap_data
name = f"{first_name} {last_name}"
return Person(name=name, email=email, affiliation=UOA, identifiers=[upi])
try:
response = self.mytardis_api_request(
"GET", self.api_template + users_stub + upi
Expand All @@ -233,7 +227,9 @@ def create_person_object(self, upi: str) -> Person:
else email
)
except RequestException as e:
logger.error("bad API response getting person data for %s: %s", upi, e)
logger.error(
"bad API response getting person data for %s. Error: %s.", upi, e
)

return Person(name=name, email=email, affiliation=UOA, identifiers=[upi])

Expand Down
139 changes: 0 additions & 139 deletions src/user_lookup/user_lookup.py

This file was deleted.

0 comments on commit e600f38

Please sign in to comment.