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

Delete a point leads to an error on gui, but point is deleted #883

Open
tabacha opened this issue Feb 14, 2025 · 2 comments
Open

Delete a point leads to an error on gui, but point is deleted #883

tabacha opened this issue Feb 14, 2025 · 2 comments

Comments

@tabacha
Copy link
Contributor

tabacha commented Feb 14, 2025

OS & Hardware
Provide your software and hardware specs

Version
0.24.1

Describe the bug
When I try to delete a point an error message is displayed:

Image

To Reproduce
Steps to reproduce the behavior:

  1. Go to The Map
  2. Click on a Point
  3. Click on the [ delete ] String
  4. Confirm
  5. See error

Expected behavior
No error is shown

Screenshots
see above

Logs

Javascript Web Console:

Image

Docker Log:

dawarich_app      | D, [2025-02-14T13:08:47.954662 #101] DEBUG -- :   Point Load (0.8ms)  SELECT "points".* FROM "points" WHERE "points"."user_id" = $1 AND "points"."id" = $2 LIMIT $3  [["user_id", 1], ["id", 2000544], ["LIMIT", 1]]
dawarich_app      | D, [2025-02-14T13:08:47.956188 #101] DEBUG -- :   ↳ app/controllers/api/v1/points_controller.rb:39:in 'Api::V1::PointsController#destroy'
dawarich_app      | D, [2025-02-14T13:08:47.958646 #101] DEBUG -- :   TRANSACTION (0.1ms)  BEGIN
dawarich_app      | D, [2025-02-14T13:08:47.960080 #101] DEBUG -- :   ↳ app/controllers/api/v1/points_controller.rb:40:in 'Api::V1::PointsController#destroy'
dawarich_app      | D, [2025-02-14T13:08:47.960717 #101] DEBUG -- :   Point Destroy (2.2ms)  DELETE FROM "points" WHERE "points"."id" = $1  [["id", 2000544]]
dawarich_app      | D, [2025-02-14T13:08:47.961865 #101] DEBUG -- :   ↳ app/controllers/api/v1/points_controller.rb:40:in 'Api::V1::PointsController#destroy'
dawarich_app      | D, [2025-02-14T13:08:47.962717 #101] DEBUG -- :   Import Update All (0.4ms)  UPDATE "imports" SET "points_count" = COALESCE("points_count", 0) - $1 WHERE "imports"."id" = $2  [["points_count", 1], ["id", 189]]
dawarich_app      | D, [2025-02-14T13:08:47.963660 #101] DEBUG -- :   ↳ app/controllers/api/v1/points_controller.rb:40:in 'Api::V1::PointsController#destroy'
dawarich_app      | D, [2025-02-14T13:08:47.964569 #101] DEBUG -- :   TRANSACTION (0.7ms)  COMMIT
dawarich_app      | D, [2025-02-14T13:08:47.965594 #101] DEBUG -- :   ↳ app/controllers/api/v1/points_controller.rb:40:in 'Api::V1::PointsController#destroy'
dawarich_app      | I, [2025-02-14T13:08:47.965960 #101]  INFO -- : {"method":"DELETE","path":"/api/v1/points/2000544","format":"*/*","controller":"Api::V1::PointsController","action":"destroy","status":200,"allocations":4609,"duration":41.35,"view":0.11,"db":5.42}

Additional context

This is not the first time this bug happens. It is very frustrating that it ocours again. Is it posible to implement a test for this?

#723
#678

@tabacha
Copy link
Contributor Author

tabacha commented Feb 14, 2025

Quickfix

Download maps_controller.js.gz
and copy it to docker container:

wget https://github.com/user-attachments/files/18799736/maps_controller.js.gz
gunzip maps_controller.js.gz
docker cp maps_controller.js dawarich_app:/var/app/app/javascript/controllers/maps_controller.js 

Refresh browser cache. Do not recreate container.

@Freika
Copy link
Owner

Freika commented Feb 15, 2025

I'll have a look this weekend, thanks for the suggested fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants