diff --git a/boards/management/commands/sync_with_server.py b/boards/management/commands/sync_with_server.py --- a/boards/management/commands/sync_with_server.py +++ b/boards/management/commands/sync_with_server.py @@ -59,8 +59,14 @@ class Command(BaseCommand): else: logger.info('Running LIST request...') h = httplib2.Http() + + tags = [] + tags_str = options.get('tags') + if tags_str: + tags = tags_str.split(',') + xml = SyncManager.generate_request_list( - opening_post=options.get('thread'), tags=options.get('tags').split(',')).encode() + opening_post=options.get('thread'), tags=tags).encode() response, content = h.request(list_url, method="POST", body=xml) if response.status != 200: raise Exception('Server returned error {}'.format(response.status))