Show More
@@ -663,6 +663,10 b' class UserModel(BaseModel):' | |||||
663 | :param api_key: api key to fetch by |
|
663 | :param api_key: api key to fetch by | |
664 | :param username: username to fetch by |
|
664 | :param username: username to fetch by | |
665 | """ |
|
665 | """ | |
|
666 | def token_obfuscate(token): | |||
|
667 | if token: | |||
|
668 | return token[:4] + "****" | |||
|
669 | ||||
666 | if user_id is None and api_key is None and username is None: |
|
670 | if user_id is None and api_key is None and username is None: | |
667 | raise Exception('You need to pass user_id, api_key or username') |
|
671 | raise Exception('You need to pass user_id, api_key or username') | |
668 |
|
672 | |||
@@ -681,7 +685,7 b' class UserModel(BaseModel):' | |||||
681 | if not dbuser: |
|
685 | if not dbuser: | |
682 | log.warning( |
|
686 | log.warning( | |
683 | 'Unable to lookup user by id:%s api_key:%s username:%s', |
|
687 | 'Unable to lookup user by id:%s api_key:%s username:%s', | |
684 | user_id, api_key, username) |
|
688 | user_id, token_obfuscate(api_key), username) | |
685 | return False |
|
689 | return False | |
686 | if not dbuser.active: |
|
690 | if not dbuser.active: | |
687 | log.debug('User `%s:%s` is inactive, skipping fill data', |
|
691 | log.debug('User `%s:%s` is inactive, skipping fill data', |
General Comments 0
You need to be logged in to leave comments.
Login now