mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-02 21:53:30 +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) {
|
for (const data of KPI_DATA) {
|
||||||
await page.getByTestId(`delete-action-${data.displayName}`).click();
|
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 page.getByTestId('confirm-button').click();
|
||||||
|
|
||||||
|
await deleteResponse;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -191,7 +191,7 @@ class RedshiftWithDBTIngestionClass extends ServiceBaseClass {
|
|||||||
// Verify DBT in table entity
|
// Verify DBT in table entity
|
||||||
await visitEntityPage({
|
await visitEntityPage({
|
||||||
page,
|
page,
|
||||||
searchTerm: REDSHIFT.DBTTable,
|
searchTerm: this.dbtEntityFqn,
|
||||||
dataTestId: `${REDSHIFT.serviceName}-${REDSHIFT.DBTTable}`,
|
dataTestId: `${REDSHIFT.serviceName}-${REDSHIFT.DBTTable}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
import { CheckOutlined } from '@ant-design/icons';
|
import { CheckOutlined } from '@ant-design/icons';
|
||||||
import { Dropdown, Space, Tooltip, Typography } from 'antd';
|
import { Dropdown, Space, Tooltip, Typography } from 'antd';
|
||||||
import { ItemType } from 'antd/lib/menu/hooks/useItems';
|
import { ItemType } from 'antd/lib/menu/hooks/useItems';
|
||||||
import { isEmpty } from 'lodash';
|
import { isEmpty, some } from 'lodash';
|
||||||
import React, {
|
import React, {
|
||||||
ReactNode,
|
ReactNode,
|
||||||
useCallback,
|
useCallback,
|
||||||
@ -312,10 +312,17 @@ export const UserProfileIcon = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
updateSelectedPersona(
|
let defaultPersona = currentUser?.defaultPersona ?? ({} as EntityReference);
|
||||||
currentUser?.defaultPersona ?? ({} as EntityReference)
|
if (currentUser?.defaultPersona?.id) {
|
||||||
);
|
defaultPersona = some(
|
||||||
}, [currentUser?.defaultPersona]);
|
currentUser?.personas,
|
||||||
|
(persona) => persona.id === currentUser?.defaultPersona?.id
|
||||||
|
)
|
||||||
|
? currentUser?.defaultPersona
|
||||||
|
: ({} as EntityReference);
|
||||||
|
}
|
||||||
|
updateSelectedPersona(defaultPersona);
|
||||||
|
}, [currentUser?.defaultPersona, currentUser?.personas]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
@ -149,7 +149,7 @@ export const checkIfUpdateRequired = async (
|
|||||||
// We want to override any profile information that is coming from the OIDC provider
|
// We want to override any profile information that is coming from the OIDC provider
|
||||||
profile: {
|
profile: {
|
||||||
...existingUserDetails.profile,
|
...existingUserDetails.profile,
|
||||||
...updatedUserData.profile
|
...updatedUserData.profile,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const jsonPatch = compare(existingUserDetails, finalData);
|
const jsonPatch = compare(existingUserDetails, finalData);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user