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

i.default.find(...) is undefined when trying to delete table or link in ERD #8318

Open
KaylaSolace opened this issue Jan 3, 2025 · 2 comments
Labels

Comments

@KaylaSolace
Copy link

KaylaSolace commented Jan 3, 2025

Please note that security bugs or issues should be reported to [email protected].

Describe the bug

While using the erd tool, occasionally tables or links will become impossible to delete, triggering a "i.default.find(...) is undefined" error in the console

To Reproduce

Steps to reproduce the behavior:

  1. Create ERD
  2. Make some tables and links
  3. Rename tables and columns a few times
  4. Some links and tables cannot be deleted anymore

Expected behavior

To be able to delete links and tables

Error message

Uncaught TypeError: i.default.find(...) is undefined removeOneToManyLink http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 removeOneToManyLink http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 onDeleteNode http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 onDeleteNode http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 onOkClick http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 Oe http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 He http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 jr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 jr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Nr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Vr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 cc http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Me http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Vr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Qt http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Ut http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 erd_tool.js:1:814489 removeOneToManyLink http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 forEach self-hosted:157 removeOneToManyLink http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 onDeleteNode http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 forEach self-hosted:157 onDeleteNode http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 onOkClick http://localhost:5050/static/js/generated/erd_tool.js?ver=81400:1 Oe http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 He http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 jr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 jr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Nr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Vr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 cc http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Me http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Vr http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Qt http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2 Ut http://localhost:5050/static/js/generated/vendor.react.js?ver=81400:2

error in chromium:

Uncaught TypeError: Cannot read properties of undefined (reading 'attnum') at erd_tool.js?ver=81400:1:814537 at Array.forEach (<anonymous>) at t.default.removeOneToManyLink (erd_tool.js?ver=81400:1:814445) at erd_tool.js?ver=81400:1:810413 at Array.forEach (<anonymous>) at erd_tool.js?ver=81400:1:810398 at Array.forEach (<anonymous>) at t.default.removeNode (erd_tool.js?ver=81400:1:810357) at erd_tool.js?ver=81400:1:835931 at Array.forEach (<anonymous>)

Desktop (please complete the following information):

  • OS: Arch Linux
  • Version: 8.14
  • Mode: Server
  • Browser (if running in server mode): Firefox @ ver 133.0.3
  • Package type: Python, installed via uv tool install

Additional context

Of note, this is an ERD for tables that do not actually exist in the database.

@KaylaSolace KaylaSolace added the Bug label Jan 3, 2025
@KaylaSolace
Copy link
Author

Ok, yes. looking at the generated SQL this seems to be from renaming tables or columns. the links seem to keep their connection to the table visually but lose what they are actually connected to when the name changes. thus, deleting them requires renaming the table and or column back to the existing name.

@KaylaSolace
Copy link
Author

potentially may be solved by solving #7903

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant