5sControl / 5sControl/5s-webserver

fix bug algorithms can't be assigned after deleting camera

Ouverte
#122 0 commentaires 0 réactions 1 personne assignée Réclamée par @ZhuchkouAA Voir sur GitHub
bug
Langage dominant
JavaScript
Étoiles
1
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Алгоритм не может быть назначен после удаления камеры с назначенными алгоритмами

**Precondition:**
Открыто приложение
пользователь авторизован
открыта страница "Configuration"
Авторизована камера, на нее назначены алгоритмы

**Environment:**
Win 11
Chrome 114

**STR:**
1. Кликнуть по кнопке "Удалить" возле камеры с назначенными алгоритмами
2. Кликнуть по кнопке "Remove" в окне "Remove a camera"
3. Кликнуть по кнопке "Add camera"
4. Добавить удаленную камеру
5. Ввести имя и пароль в поля "Username", "Password" (admin. just4Taqtile) вкладка "Camera", window "Camera Settings"
6. Кликнуть по кнопке "Done"
7. Кликнуть по камере
8. Кликнуть по вкладке "Algorithms" window "Camera Settings"
9. Кликнуть по чек-боксу любого алгоритма
10. Кликнуть по кнопке "Done"

**ER:**
Алгоритм назначен на камеру

**AR:**
Алгоритм не назначен на камеру, 500 ошибка запроса POST http://192.168.1.110/api/camera-algorithms/create-process/
**Attachments:**

![Image](https://user-images.githubusercontent.com/122295113/261043758-109b5407-1f78-448d-9e03-0db849c9a431.png)

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

The bug occurs when re-adding a camera after deletion and trying to assign algorithms, resulting in a 500 error on POST /api/camera-algorithms/create-process/. Start by examining the backend API endpoint for camera-algorithms creation, likely in a controller or route file. Check the database models for Camera and Algorithm to see how associations are managed and if any orphaned records or state issues persist after camera deletion. Reproduce the error locally by following the steps, then inspect server logs for the exact cause of the 500 error.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
api, backend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.