Add Event.created_by (the owner, used later by the access service to let an event's creator edit it). Validate that an event's season/location/opponent — and an EventSeries' location/opponent — belong to the event's club. The teams M2M cannot be checked in clean() (M2M rows are written after save), so an m2m_changed pre_add receiver rejects teams from another club. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
21 lines
630 B
Python
21 lines
630 B
Python
# Generated by Django 6.0.6 on 2026-07-12 21:43
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('events', '0007_event_series_until'),
|
|
('members', '0002_alter_familymembership_unique_together_and_more'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='event',
|
|
name='created_by',
|
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='created_events', to='members.member', verbose_name='created by'),
|
|
),
|
|
]
|