##// END OF EJS Templates
Pass parsed date instead of entered text to the sync
neko259 -
r2118:537102f9 default
parent child Browse files
Show More
@@ -68,9 +68,14 b' class Command(BaseCommand):'
68 if tags_str:
68 if tags_str:
69 tags = tags_str.split(',')
69 tags = tags_str.split(',')
70
70
71 timestamp_str = options.get('time_from')
72 timestamp = None
73 if timestamp_str:
74 timestamp = parse_datetime(timestamp_str)
75
71 xml = SyncManager.generate_request_list(
76 xml = SyncManager.generate_request_list(
72 opening_post=options.get('thread'), tags=tags,
77 opening_post=options.get('thread'), tags=tags,
73 timestamp_from=options.get('time_from')).encode()
78 timestamp_from=timestamp).encode()
74 response, content = h.request(list_url, method="POST", body=xml)
79 response, content = h.request(list_url, method="POST", body=xml)
75 if response.status != 200:
80 if response.status != 200:
76 raise Exception('Server returned error {}'.format(response.status))
81 raise Exception('Server returned error {}'.format(response.status))
General Comments 0
You need to be logged in to leave comments. Login now