bottleneckcrm/backend/webforms/migrations/0004_rotation_assignment.py
Ashwin 2be3f51efc Add comprehensive tests for ticket closing, calendar feed, deal board, macros, session caches, and web form models
- Implement tests for closing tickets via menu and status picker, ensuring correct API interactions and error handling.
- Create tests for calendar feed provider, verifying throttling behavior and success responses.
- Add tests for deal board provider, covering reading and moving deals, including edge cases for card movement and filters.
- Enhance macro tests to validate action parsing and application to tickets, including error handling.
- Introduce session cache tests to ensure proper cleanup on sign-out and validate session-scoped providers.
- Extend web form model tests to cover lead rotation functionality, ensuring correct serialization and defaults.
2026-09-27 06:28:09 +05:30

56 lines
1.7 KiB
Python

# Generated by Django 6.1.1 on 2026-09-26 18:49
import django.core.validators
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
# No new table, so no RLS work: `web_form` already carries its policy, and
# the M2M through table has no org_id column, like `notify_profiles`'.
# Profile comes in through 0001's dependency on common.
dependencies = [
("webforms", "0003_ticket_target"),
]
operations = [
migrations.AddField(
model_name="webform",
name="assignment_mode",
field=models.CharField(
choices=[
("person", "One person"),
("rotation", "Rotate between members"),
],
default="person",
max_length=16,
),
),
migrations.AddField(
model_name="webform",
name="rotation_cap",
field=models.PositiveIntegerField(
blank=True,
null=True,
validators=[django.core.validators.MinValueValidator(1)],
),
),
migrations.AddField(
model_name="webform",
name="rotation_last_assigned",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="common.profile",
),
),
migrations.AddField(
model_name="webform",
name="rotation_members",
field=models.ManyToManyField(
blank=True, related_name="webforms_rotated", to="common.profile"
),
),
]