From 9c2c21c2ccc5cd86e8a81afca0d8fad5b7913366 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Mon, 3 Aug 2026 11:17:28 -0400 Subject: [PATCH] fix(employees): resolve User through the contract surface test_plugins_only_import_contract_surface has been failing on main since 9a2d0cc: the employee name resolver imported shopdb.core.models directly. shopdb.api already exports User (contract 0.13.0), so this is the same object reached the way ADR-001 requires. --- plugins/employees/api/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/employees/api/routes.py b/plugins/employees/api/routes.py index ea3e2e0..2cbccf3 100644 --- a/plugins/employees/api/routes.py +++ b/plugins/employees/api/routes.py @@ -153,7 +153,7 @@ def resolve_employee_display_name(sso): # location not carried in the directory). Their name lives on the User # record; GE usernames are the SSO. Photo still falls back to the GE mark. try: - from shopdb.core.models import User + from shopdb.api import User user = User.query.filter_by(username=str(sso)).first() if user: name = f'{(user.firstname or "").strip()} {(user.lastname or "").strip()}'.strip()