Skip to content

Commit

Permalink
fix patch request for inherited ownership (open-metadata#16383)
Browse files Browse the repository at this point in the history
  • Loading branch information
karanh37 authored May 22, 2024
1 parent f5edf6c commit c6108cf
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ const DashboardDetails = ({
async (newOwner?: Dashboard['owner']) => {
const updatedDashboard = {
...dashboardDetails,
owner: newOwner ? { ...owner, ...newOwner } : undefined,
owner: newOwner,
};
await onDashboardUpdate(updatedDashboard, 'owner');
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,7 @@ const MlModelDetail: FC<MlModelDetailProp> = ({
async (newOwner?: Mlmodel['owner']) => {
const updatedMlModelDetails = {
...mlModelDetail,
owner: newOwner
? {
...mlModelDetail.owner,
...newOwner,
}
: undefined,
owner: newOwner,
};
await settingsUpdateHandler(updatedMlModelDetails);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ const PipelineDetails = ({
async (newOwner?: Pipeline['owner']) => {
const updatedPipelineDetails = {
...pipelineDetails,
owner: newOwner ? { ...owner, ...newOwner } : undefined,
owner: newOwner,
};
await settingsUpdateHandler(updatedPipelineDetails);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,7 @@ const TopicDetails: React.FC<TopicDetailsProps> = ({
async (newOwner?: Topic['owner']) => {
const updatedTopicDetails = {
...topicDetails,
owner: newOwner
? {
...owner,
...newOwner,
}
: undefined,
owner: newOwner,
};
await onTopicUpdate(updatedTopicDetails, 'owner');
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ const DatabaseDetails: FunctionComponent = () => {
async (owner: Database['owner']) => {
const updatedData = {
...database,
owner: owner ? { ...database?.owner, ...owner } : undefined,
owner: owner,
};

await settingsUpdateHandler(updatedData as Database);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ const DatabaseSchemaPage: FunctionComponent = () => {
try {
const updatedData = {
...databaseSchema,
owner: owner ? { ...databaseSchema?.owner, ...owner } : undefined,
owner: owner,
};

const response = await saveUpdatedDatabaseSchemaData(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,7 @@ function SearchIndexDetailsPage() {
}
const updatedSearchIndexDetails = {
...searchIndexDetails,
owner: newOwner
? {
...owner,
...newOwner,
}
: undefined,
owner: newOwner,
};
await onSearchIndexUpdate(updatedSearchIndexDetails, 'owner');
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,7 @@ const StoredProcedurePage = () => {
}
const updatedEntityDetails = {
...storedProcedure,
owner: newOwner
? {
...owner,
...newOwner,
}
: undefined,
owner: newOwner,
};
await handleStoreProcedureUpdate(updatedEntityDetails, 'owner');
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,7 @@ const TableDetailsPageV1: React.FC = () => {
}
const updatedTableDetails = {
...tableDetails,
owner: newOwner
? {
...owner,
...newOwner,
}
: undefined,
owner: newOwner,
};
await onTableUpdate(updatedTableDetails, 'owner');
},
Expand Down

0 comments on commit c6108cf

Please sign in to comment.