Skip to content

Commit

Permalink
Added error message when feedback requested without selecting any movie
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi2019194 committed Oct 15, 2023
1 parent d1b2c21 commit 271fb86
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/recommenderapp/static/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ $(document).ready(function () {
2: "Yet to watch",
3: "Like",
};

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 271fb86

Please sign in to comment.