Skip to content

Commit

Permalink
Fixed issue with duplicate ids
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jun 3, 2021
1 parent 64a81fb commit fc4e141
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions ui/src/app/metadata/domain/provider/BaseProviderDefinition.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ export const BaseProviderDefinition = {
const ids = providers.map(s => s.xmlId);

return (formData, errors) => {

if (names.indexOf(formData.name) > -1) {
errors.name.addError('message.name-must-be-unique');
}

if (ids.indexOf(formData.xmlId) > -1) {
errors.xmlId.addError('message.id-unique');
}

return errors;
}
},
Expand Down
4 changes: 1 addition & 3 deletions ui/src/app/metadata/hooks/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ export function useUiSchema(definition, schema, current, locked = true) {
...mapped,
'ui:disabled': locked && step.locked ? true : false
};
}, [mapped, step.locked, locked])

console.log(isLocked);
}, [mapped, step.locked, locked]);

return {uiSchema: isLocked, step};
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/metadata/wizard/MetadataProviderWizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { useNotificationDispatcher, createNotificationAction, NotificationTypes

export function MetadataProviderWizard({onRestart}) {

const { data } = useMetadataProviders({}, []);
const { data } = useMetadataProviders({cachePolicy: 'no-cache'}, []);

const { post, loading, response } = useMetadataEntity('provider');
const history = useHistory();
Expand Down
4 changes: 3 additions & 1 deletion ui/src/app/metadata/wizard/MetadataSourceWizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export function MetadataSourceWizard ({ onShowNav }) {
const { post, loading, response } = useMetadataEntity('source');
const history = useHistory();

const { data } = useMetadataSources({}, []);
const { data } = useMetadataSources({
cachePolicy: 'no-cache'
}, []);

const definition = useMetadataDefinitionContext();
const schema = useMetadataSchemaContext();
Expand Down

0 comments on commit fc4e141

Please sign in to comment.