summaryrefslogtreecommitdiff
path: root/meetingtools/apps/archive/management/commands/update_recordings.py
blob: 8aad7477ff9fcb8ab0844a1318dccfbaa2ab08fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from django.core.management import BaseCommand
from meetingtools.apps.archive.models import Archive
from meetingtools.apps.cluster.models import ACCluster

__author__ = 'leifj'

class Command(BaseCommand):

    def handle(self, *args, **options):
        for ar in Archive.objects.all():
            info = ar.sco.info()
            if info is None:
                continue
            print info
            if info.has_key('name'):
                ar.name = info['name']
            if info.has_key('description'):
                ar.description = info['description']
            ar.save()