5sControl / 5sControl/5s-backend

fix bug assigned algorithm is removed when u delete one of zones

未关闭
#349 0 条评论 0 个 reaction 已指派 1 人 已被 @Dimskay1988 认领 在 GitHub 查看
bug
主要语言
Python
星标
2
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

**Summary:** Назначенный алгоритм снимается с камеры, если удалить одну из зон

**Environment:**
Chrome 114
Win 11
Kaunas hp, 110, 111

**Precondition:**
- камера авторизована
- введен лицензионный ключ
- на камере создано несколько зон (2 или более), которые выбраны и назначены в табе "Algorithms"
- Открыта страница "Configuration"

**STR:**
1. Кликнуть по камере
2. Кликнуть по табу "Zones" в окне "Camera Settings"
3. Кликнуть по кнопке "Развернуть" возле названия зоны
4. Кликнуть по кнопке "Delete"
5. Кликнуть по кнопке "Done"

**ER:**
Алгоритм повешен на камеру, т.к. есть назначенные зоны, которые не были удалены

**AR:**
Алгоритм снимается с камеры
( в запросе http://192.168.1.111/api/camera-algorithms/create-process/
массив algorithms пустой)
**Attachments:**
https://drive.google.com/file/d/12LP0y1nkzcQvOnYSnoRf7NHiWV7OvFqD/view?usp=drive_link

![Image](https://user-images.githubusercontent.com/122295113/251745808-c2290d0c-cd92-4665-93d4-3e8b828b255d.png)

贡献指南

打开贡献指南

调研方向

The bug occurs when deleting a zone, causing the camera's assigned algorithm to be removed. Examine the API endpoint at /api/camera-algorithms/create-process/ and the logic for handling zone deletions. Look at the camera and zone models, and the algorithm assignment flow. Check the request payload to see why the algorithms array becomes empty after a zone deletion.

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api, backend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。