Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle case where Book belonging to Bookinstance is deleted. #121

Closed
4 tasks done
hamishwillee opened this issue Jul 14, 2023 · 0 comments · Fixed by #124
Closed
4 tasks done

Handle case where Book belonging to Bookinstance is deleted. #121

hamishwillee opened this issue Jul 14, 2023 · 0 comments · Fixed by #124
Labels
bug Indicates an unexpected problem or unintended behavior. idle Issues and pull requests with no activity for three months.

Comments

@hamishwillee
Copy link
Collaborator

Before submitting the issue, confirm that you've checked everything in the following list, and mark them as completed here:

  • Issue is reproducible on this repository by following the quick-start instructions.
  • A clean/fresh database was used when the issue was encountered.
  • Information about the environment setup when the issue was encountered is included in the issue.
  • Output logs are included in the issue.

What was incorrect, unhelpful, or unexpected?

The problem is described here mdn/content#27895 and the "base" of the solution is described in comment here: mdn/content#27895 (comment)

In short, this example stops at the same point as the tutorial challenge, which was creating forms for create, modify, delete, of books. It does not show any code for bookinstances.

However if you were to implement a bookinstance code, assign a book, and then you delete the book you get an error - because the book model requires you cannot delete a book unless all its instances are first deleted.

What did you expect to see?

We need to implement the bookinstance stuff as well (to ease testing) and override the book implementation to handle the error and provide a new view in this error case.

We should also create a Test for this case in the test cases, though that is not essential.

Output logs

Nope.

Do you have anything more you want to share?

Nope

@hamishwillee hamishwillee added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jul 14, 2023
@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Aug 13, 2023
@caugner caugner added bug Indicates an unexpected problem or unintended behavior. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Oct 2, 2023
@github-actions github-actions bot removed the idle Issues and pull requests with no activity for three months. label Oct 3, 2023
@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior. idle Issues and pull requests with no activity for three months.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants