fix: sharepoint neutralisierung wieder eingebaut

This commit is contained in:
Ida Dittrich 2026-02-26 15:50:16 +01:00
parent d3cfe8e9be
commit ea99711ace

View file

@ -266,7 +266,11 @@ class SharepointProcessor:
try:
# Use interface method to get user connections
connections = self.services.interfaceDbApp.getUserConnections(self.services.interfaceDbApp.userId)
msftConnections = [c for c in connections if c.authority == 'msft']
def _is_msft_connection(c):
av = c.authority.value if hasattr(c.authority, 'value') else str(getattr(c, 'authority', ''))
return av and str(av).lower() == 'msft'
msftConnections = [c for c in connections if _is_msft_connection(c)]
if not msftConnections:
logger.warning('No Microsoft connections found for user')
return None