mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-26 01:56:06 +00:00
fixes issue with new compliance policy: updates msg string to newly updated value
This commit is contained in:
parent
e446135ec6
commit
59c9b00c8e
@ -27,7 +27,7 @@ const datasetComplianceSuggestionsUrlById = (id: number): string => `${datasetCo
|
|||||||
*/
|
*/
|
||||||
const readDatasetCompliance = async (id: number): Promise<{ isNewComplianceInfo: boolean; complianceInfo: any }> => {
|
const readDatasetCompliance = async (id: number): Promise<{ isNewComplianceInfo: boolean; complianceInfo: any }> => {
|
||||||
assert(`Expected id to be a number but received ${typeof id}`, typeof id === 'number');
|
assert(`Expected id to be a number but received ${typeof id}`, typeof id === 'number');
|
||||||
const notFound = 'actual 0';
|
const notFound = 'No entity found for query';
|
||||||
// complianceInfo contains the compliance data for the specified dataset
|
// complianceInfo contains the compliance data for the specified dataset
|
||||||
let {
|
let {
|
||||||
msg = '',
|
msg = '',
|
||||||
@ -52,12 +52,9 @@ const readDatasetCompliance = async (id: number): Promise<{ isNewComplianceInfo:
|
|||||||
* @return {Promise<IComplianceSuggestion>}
|
* @return {Promise<IComplianceSuggestion>}
|
||||||
*/
|
*/
|
||||||
const readDatasetComplianceSuggestion = async (id: number): Promise<IComplianceSuggestion> => {
|
const readDatasetComplianceSuggestion = async (id: number): Promise<IComplianceSuggestion> => {
|
||||||
const response: IComplianceSuggestionResponse = await Promise.resolve(
|
const { complianceSuggestion = <IComplianceSuggestion>{} }: IComplianceSuggestionResponse = await Promise.resolve(
|
||||||
getJSON(datasetComplianceSuggestionsUrlById(id))
|
getJSON(datasetComplianceSuggestionsUrlById(id))
|
||||||
);
|
);
|
||||||
const emptySuggestion = {} as IComplianceSuggestion;
|
|
||||||
const { complianceSuggestion = emptySuggestion } = response;
|
|
||||||
|
|
||||||
return complianceSuggestion;
|
return complianceSuggestion;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user