Skip to content

Commit

Permalink
Merge pull request #23 from adipai/refactor-branch
Browse files Browse the repository at this point in the history
Added error message when feedback requested without selecting any movie
  • Loading branch information
rishi2019194 authored Oct 15, 2023
2 parents d1b2c21 + c0d9f89 commit 0323ba9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/recommenderapp/static/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ $(document).ready(function () {
2: "Yet to watch",
3: "Like",
};

// to check if any movies selected before giving feedback
if(myForm.length == 0){
alert("No movies found. Please add movies to provide feedback.");
return;
}
var error = false; // Flag to track errors

for (var i = 0; i < myForm.length; i++) {
Expand Down

0 comments on commit 0323ba9

Please sign in to comment.