GoogleCloudPlatform / cloud-run-anthos-reference-web-app

An opinionated set of best practices aimed at demonstrating a reference architecture for building a web application on Google Cloud using Cloud Run for Anthos.
https://cloud.google.com/anthos/run
Apache License 2.0
37 stars 22 forks source link

Nonsensical inventory transactions remain after deleting item #51

Open ssmall opened 4 years ago

ssmall commented 4 years ago

Description

After I delete an item that has associated inventory transactions, the transactions still show up under the original location but with strange item names:

screenshot of inventory transactions with strange item names

Steps to Reproduce

1. Create a new item

On the /items page, click create and give it an arbitrary name and description

2. Create a new location

On the /locations page, click create and give it an arbitrary name and description

3. Add transactions

Go to /items and click on the item created in #1. Create one or more transactions associated with the item and location.

4. Delete item

Go back to /items and click on the item created in #1. Click "Delete".

5. View location

Go to /locations and click on the location created in #2.

Expected Behavior

No inventory transactions should be displayed because the associated item no longer exists

Actual Behavior

Inventory transactions are listed but the item name column has a random ID in place of the original item name. Clicking on the hyperlink for the item id leads to a blank page.