mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-02 13:43:22 +00:00
fix(ui): GEN-1523 exclude defaultPersona if not present in personas (#17940)
This commit is contained in:
parent
1badbb260b
commit
c1a4f487b1
@ -187,8 +187,13 @@ test.describe('Data Insight Page', { tag: '@data-insight' }, () => {
|
||||
|
||||
for (const data of KPI_DATA) {
|
||||
await page.getByTestId(`delete-action-${data.displayName}`).click();
|
||||
await page.getByTestId('confirmation-text-input').type('DELETE');
|
||||
await page.getByTestId('confirmation-text-input').fill('DELETE');
|
||||
const deleteResponse = page.waitForResponse(
|
||||
`/api/v1/kpi/*?hardDelete=true&recursive=false`
|
||||
);
|
||||
await page.getByTestId('confirm-button').click();
|
||||
|
||||
await deleteResponse;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -191,7 +191,7 @@ class RedshiftWithDBTIngestionClass extends ServiceBaseClass {
|
||||
// Verify DBT in table entity
|
||||
await visitEntityPage({
|
||||
page,
|
||||
searchTerm: REDSHIFT.DBTTable,
|
||||
searchTerm: this.dbtEntityFqn,
|
||||
dataTestId: `${REDSHIFT.serviceName}-${REDSHIFT.DBTTable}`,
|
||||
});
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
import { CheckOutlined } from '@ant-design/icons';
|
||||
import { Dropdown, Space, Tooltip, Typography } from 'antd';
|
||||
import { ItemType } from 'antd/lib/menu/hooks/useItems';
|
||||
import { isEmpty } from 'lodash';
|
||||
import { isEmpty, some } from 'lodash';
|
||||
import React, {
|
||||
ReactNode,
|
||||
useCallback,
|
||||
@ -312,10 +312,17 @@ export const UserProfileIcon = () => {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
updateSelectedPersona(
|
||||
currentUser?.defaultPersona ?? ({} as EntityReference)
|
||||
);
|
||||
}, [currentUser?.defaultPersona]);
|
||||
let defaultPersona = currentUser?.defaultPersona ?? ({} as EntityReference);
|
||||
if (currentUser?.defaultPersona?.id) {
|
||||
defaultPersona = some(
|
||||
currentUser?.personas,
|
||||
(persona) => persona.id === currentUser?.defaultPersona?.id
|
||||
)
|
||||
? currentUser?.defaultPersona
|
||||
: ({} as EntityReference);
|
||||
}
|
||||
updateSelectedPersona(defaultPersona);
|
||||
}, [currentUser?.defaultPersona, currentUser?.personas]);
|
||||
|
||||
return (
|
||||
<Dropdown
|
||||
|
@ -149,7 +149,7 @@ export const checkIfUpdateRequired = async (
|
||||
// We want to override any profile information that is coming from the OIDC provider
|
||||
profile: {
|
||||
...existingUserDetails.profile,
|
||||
...updatedUserData.profile
|
||||
...updatedUserData.profile,
|
||||
},
|
||||
};
|
||||
const jsonPatch = compare(existingUserDetails, finalData);
|
||||
|
Loading…
x
Reference in New Issue
Block a user