-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix AttributeError: 'Authorization' object has no attribute 'log' #660
Conversation
d4ba2fc
to
c60bc18
Compare
Please can you paste what you did to demonstrate the bug? |
self.owner_user_groups: List[str] = self._get_groups( | ||
self.owner_user_name | ||
) | ||
self.log = log | ||
self.owner_auth_conf: dict = owner_auth_conf | ||
self.site_auth_config: dict = site_auth_conf | ||
self.owner_user_groups: List[str] = self._get_groups( | ||
self.owner_user_name | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to reproduce it, but the cause should be fairly self-evident from looking at self._get_groups()
:
cylc-uiserver/cylc/uiserver/authorise.py
Lines 487 to 492 in ef4a4d1
good_groups, bad_groups = get_groups(user) | |
if bad_groups: | |
self.log.warning( | |
f'{user} has the following invalid groups in their profile ' | |
f'{bad_groups} - these groups will be ignored.' | |
) |
Can't use self.log
before it's been defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
Edit: fixes a bug introduced in #613
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.?.?.x
branch.