CLaffan / Cinema_Manager

Cinema management app
0 stars 0 forks source link

Unable to add new movie #1

Open CLaffan opened 10 months ago

CLaffan commented 10 months ago

Error when adding new movie to the cinema. Error seems to be in cinema.py.

CLaffan commented 10 months ago

Functionin main.py

CLaffan commented 10 months ago

Can bypass the checking if movie is there but then add more issues on top of it so no good

CLaffan commented 10 months ago
  1. def evtAddMovie():
  2. global _moviename
  3. m = cinema.findMovieItem(_moviename)

  4. if m == None: # make sure it does nto exist

  5. m = Movie()
  6. m.name = edMoviName.value
  7. m.minutes = edDuration.value
  8. m.rating = edRating.value
  9. m.genre = edGenre.value
  10. edMoviName.value = ""
  11. edDuration.value = ""
  12. edRating.value = ""
  13. edGenre.value = "not set"
  14. cinema.add(m)
  15. _moviename = ""
  16. Commenting out lines 3 & 4 allow me to add a new movie.