5sControl / 5sControl/5s-backend

fix bug item is deleted after reloading the page

Đang mở
#363 0 bình luận 0 reaction 1 người được giao Được @nnnLik nhận Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
2
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Айтем с удаленной камерой удаляется только после перезагрузки страницы "Inventory"

**Precondition:**
создан айтем, у которого **УДАЛЕНА** камера

**Environment:**
win 11
Chrome 114
110, 111, kaunas hp

**STR:**
1. Кликнуть по мит-болу
2. Кликнуть по опции "Delete"
3. Кликнуть по кнопке "Delete" в модальном окне "Delete item"
4. Перезагрузить страницу

**ER:**
Айтем удалятся после выполнения шага 3

**AR:**
Айтем остается после выполнения шага 3, 500 status-code, удаляется после выполнения шага 4

**Attachments**

![Image](https://user-images.githubusercontent.com/122295113/254815716-338285ae-0ac5-4a81-89cd-8d6798e0b65e.png)
https://drive.google.com/file/d/1A_kIrZvo45BrzTZoOS2_yPFjqvWt1AcS/view?usp=drive_link

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

The issue describes an item with a deleted camera not being removed from the inventory page until a page reload, with a 500 status code on deletion. Start by examining the backend API endpoint for deleting items, likely in a Django view or DRF viewset. Check the server logs for the 500 error and trace the deletion logic, particularly how it handles items with deleted cameras. Look at the inventory models and the delete method to see if there's a condition or transaction that fails. Verify the frontend's handling of the delete response and any caching that might prevent immediate UI updates.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
django, python
Lĩnh vực
api, backend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.