Removed error suppression from sql data transformation. (#205)

This commit is contained in:
Philipp Horstenkamp 2023-10-09 17:58:20 +02:00 committed by GitHub
parent 84d0139531
commit 68346aff15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -395,19 +395,13 @@ def add_person_relation(person: dict[str, Any], company_id: int, db: Session) ->
db=db,
)
except DataInvalidError:
# logger.exception("Test except: ")
if date_of_brith:
# print("Break")
raise
# TODO enable the following line
# logger.warning(f"No date of birth birth for {name['firstname']} {name['lastname']}")
logger.debug(
f"No date of birth birth for {person['name']['lastname']}, {person['name']['firstname']}"
)
db.rollback()
return
except TypeError as error:
# TODO remove unhashable type catcher
if "unhashable type: 'dict'" in str(error):
return
raise
except Exception:
logger.exception("Test except")
raise