NiclO1337 / pp4-banana-palace

A website for a restaurant specializing in delicious recipes using bananas. Fourth portfolio project with Code Institute.
0 stars 1 forks source link

[BUG] bug #53

Closed NiclO1337 closed 6 months ago

NiclO1337 commented 6 months ago

Describe the bug When deleting a table, it should make the table avalible to be reserved again but the table is still red in book a table page.

To Reproduce Steps to reproduce the behavior:

  1. Go to book a table page
  2. Choose a table and make a reservation
  3. Then delete the reservation
  4. Go back to book a table page and see that it is not possible to reserve that table

Expected behavior When reservation is deleted, the table should become avalible for reserving again.

NiclO1337 commented 6 months ago

Solved by adding:

reservation.table.reserved = False reservation.table.save() into the delete_reservation view before deleting the reservation.