diff --git a/eda-frontend/src/components/LTI/LTI.js b/eda-frontend/src/components/LTI/LTI.js index 5f8f585e..30d259c3 100644 --- a/eda-frontend/src/components/LTI/LTI.js +++ b/eda-frontend/src/components/LTI/LTI.js @@ -203,6 +203,14 @@ export default function LTIConfig () { // eslint-disable-next-line const handleLTIGenerate = () => { + if (!ltiDetails.consumerKey || !ltiDetails.secretKey) { + setLTIDetails({ ...ltiDetails, consumerError: 'Consumer Key and Secret Key are required.' }) + return + } + if (!ltiDetails.modelSchematic || !ltiDetails.modelSchematic.id) { + setLTIDetails({ ...ltiDetails, consumerError: 'Please select a schematic before generating LTI URL.' }) + return + } var score = '' if (!ltiDetails.scored) { score = null