mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed some SonarQube issues.
This commit is contained in:
@@ -941,14 +941,14 @@ def set_master_password():
|
||||
if not config.SERVER_MODE and config.MASTER_PASSWORD_REQUIRED:
|
||||
|
||||
# if master pass is set previously
|
||||
if current_user.masterpass_check is not None:
|
||||
if data.get('button_click') and \
|
||||
not validate_master_password(data.get('password')):
|
||||
return form_master_password_response(
|
||||
existing=True,
|
||||
present=False,
|
||||
errmsg=gettext("Incorrect master password")
|
||||
)
|
||||
if current_user.masterpass_check is not None and \
|
||||
data.get('button_click') and \
|
||||
not validate_master_password(data.get('password')):
|
||||
return form_master_password_response(
|
||||
existing=True,
|
||||
present=False,
|
||||
errmsg=gettext("Incorrect master password")
|
||||
)
|
||||
|
||||
if data != '' and data.get('password', '') != '':
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@ export function Search() {
|
||||
const wrapperRef = useRef(null);
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
const [isShowMinLengthMsg, setIsShowMinLengthMsg] = useState(false);
|
||||
let helpLinkTitles = [];
|
||||
let helpLinks = [];
|
||||
const [isMenuLoading, setIsMenuLoading] = useState(false);
|
||||
const [isHelpLoading, setIsHelpLoading] = useState(false);
|
||||
const [menuSearchResult, setMenuSearchResult] = useState({
|
||||
@@ -51,11 +49,6 @@ export function Search() {
|
||||
|
||||
// Below will be called when any changes has been made to state
|
||||
useEffect(() => {
|
||||
helpLinkTitles = Object.keys(helpSearchResult.data);
|
||||
for(let i = 0; i<helpLinkTitles.length;i++){
|
||||
helpLinks.push(<a href={''} target='_blank' rel='noreferrer'>helpLinkTitles[i]</a>);
|
||||
}
|
||||
|
||||
if(menuSearchResult.fetched == true){
|
||||
setIsMenuLoading(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user