File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -446,15 +446,15 @@ def discord_ids_for_team(self, team: Team) -> set[int]:
446446 for named in team .users :
447447 user = self .redmine .user_mgr .cache .get (named .id ) #expected to be cached
448448 if user :
449- if user .discord_id :
450- discord_ids .add (user .discord_id .id )
449+ if user .discord_id and user . discord_id . id > 0 :
450+ discord_ids .add (user .discord_id .id ) # <-- data might have 0
451451 else :
452452 log .info (f"No Discord ID for { named } " )
453453 elif self .redmine .user_mgr .is_team (named .name ):
454454 # a team, look up role it.
455455 team = self .get_role_by_name (named .name )
456456 if team :
457- discord_ids .add (f"&{ team .id } " )
457+ discord_ids .add (f"&{ team .id } " ) # <-- is this valid for roles?
458458 else :
459459 log .warning (f"Team name { named } has no matching Discord role." )
460460 else :
You can’t perform that action at this time.
0 commit comments