fix(employees): Заменить устаревший type='department' на 'channel' в сигналах

- Тип 'department' был полностью удален из communications
- Чаты отделов теперь используют type='channel'
- Исправлено 2 вхождения в create_main_department_chat()
This commit is contained in:
lizerk 2026-03-11 17:51:51 +03:00
parent ae21c7cae7
commit 9744009d6b

View File

@ -42,7 +42,7 @@ def create_main_department_chat(sender, instance, created, **kwargs):
# Проверка: существует ли уже чат для этого отдела
existing = Chat.objects.filter(
type="department",
type="channel",
context_content_type=dept_ct,
context_object_id=instance.id,
flags__is_primary=True
@ -50,7 +50,7 @@ def create_main_department_chat(sender, instance, created, **kwargs):
if not existing:
Chat.objects.create(
type="department",
type="channel",
context_content_type=dept_ct,
context_object_id=instance.id,
flags={'is_primary': True},