summaryrefslogtreecommitdiff
path: root/meetingtools/apps/room/management
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2012-10-31 21:30:58 +0100
committerLeif Johansson <leifj@sunet.se>2012-10-31 21:30:58 +0100
commit20b3f0b2cd843803ab819b9a58eba2c419b3541a (patch)
treea2e5799bb9f54e70e51e2bb3355c3dda3bfada15 /meetingtools/apps/room/management
parent09b5b8ddcf892eb689f32a271fba11e142e82441 (diff)
filter on clusters
Diffstat (limited to 'meetingtools/apps/room/management')
-rw-r--r--meetingtools/apps/room/management/commands/import_rooms.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/meetingtools/apps/room/management/commands/import_rooms.py b/meetingtools/apps/room/management/commands/import_rooms.py
index abdc696..d5421e3 100644
--- a/meetingtools/apps/room/management/commands/import_rooms.py
+++ b/meetingtools/apps/room/management/commands/import_rooms.py
@@ -13,8 +13,16 @@ class Command(BaseCommand):
dest='since',
default=0,
help='Import all rooms modified <since> seconds ago'),
+ make_option('--cluster',
+ type='int',
+ dest='cluster',
+ default=0,
+ help='Import rooms from cluster <cluster> (id)'),
)
def handle(self, *args, **options):
- for acc in ACCluster.objects.all():
+ qs = ACCluster.objects
+ if options['cluster'] > 0:
+ qs = qs.filter(pk=options['cluster'])
+ for acc in qs.all():
import_acc(acc,since=options['since']) \ No newline at end of file