View | Details | Raw Unified | Return to bug 56937
Collapse All | Expand All

(-)file_not_specified_in_diff (-5 / +8 lines)
Line     Link Here 
0
-- /root/univention-support/room_management.py.bak     2023-12-22 13:06:57.604699671 +0100                           
0
++ /usr/lib/python3/dist-packages/univention/management/console/modules/computerroom/room_management.py        2023-1
 Lines 94-104    Link Here 
94
94
95
    def validate_userstr(self, userstr):  # type: (str) -> str
95
    def validate_userstr(self, userstr):  # type: (str) -> str
96
        match = self._user_regex.match(userstr)
96
        match = self._user_regex.match(userstr)
97
        if not match or not userstr:
97
        if not userstr:
98
            raise AttributeError("invalid key {!r}".format(userstr))
98
            raise AttributeError("invalid key {!r}".format(userstr))
99
        username = match.groupdict()["username"]
99
        if match:
100
        if not username:
100
            username = match.groupdict()["username"]
101
            raise AttributeError("username missing: {!r}".format(userstr))
101
        else:
102
            username = ""
103
        #if not username:
104
        #    raise AttributeError("username missing: {!r}".format(userstr))
102
        return username
105
        return username
103
106
104
    @LDAP_Connection()
107
    @LDAP_Connection()

Return to bug 56937