Revision 38b4bc27
Added by Jérôme Schneider over 11 years ago
scripts/copy_description.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
#!/usr/bin/env python |
|
3 |
|
|
4 |
import calebasse.settings |
|
5 |
import django.core.management |
|
6 |
|
|
7 |
django.core.management.setup_environ(calebasse.settings) |
|
8 |
|
|
9 |
from calebasse.agenda.models import EventWithAct |
|
10 |
|
|
11 |
for event in EventWithAct.objects.all(): |
|
12 |
if not event.act.comment and event.description: |
|
13 |
event.act.comment = event.description |
|
14 |
event.act.save() |
Also available in: Unified diff
agenda / act: synchronise comment and description between EventWithAct
and Act
Fixes #2602