Enforcement reports with asset context; contract 0.17.0

This commit is contained in:
2026-08-12 16:41:16 -04:00
parent e8f33cffa1
commit 8d1f442daf
3 changed files with 6 additions and 5 deletions

View File

@@ -1014,10 +1014,7 @@ def _attach_display_roles(facts, hostnames):
ShopDB's mirror of the display-type.txt each kiosk reads at startup.
"""
try:
from shopdb.core.models.dashboarddefault import DashboardDefault
except ImportError:
return
from shopdb.api import DashboardDefault
lowered = {name.lower() for name in hostnames}
for default in DashboardDefault.query.filter_by(isactive=True).all():
host = (default.fqdn or '').split('.')[0].lower()