# HG changeset patch # User neko259 # Date 2017-01-26 13:33:57 # Node ID b8a95ef763d1a54761fa4a840d61746b3203d61f # Parent 031556bda9458fcc2585c30a1e3f1a31419c32b5 Fixed sync without specifying tags filter 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))