diff --git a/boards/abstracts/sync_filters.py b/boards/abstracts/sync_filters.py --- a/boards/abstracts/sync_filters.py +++ b/boards/abstracts/sync_filters.py @@ -62,5 +62,5 @@ class TimestampFromFilter(PostFilter): def add_filter(self, model_tag, value): tags_from_time = et.SubElement(model_tag, TAG_TIME_FROM) - tags_from_time.text = value + tags_from_time.text = str(value) 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 @@ -72,6 +72,9 @@ class Command(BaseCommand): timestamp = None if timestamp_str: timestamp = parse_datetime(timestamp_str) + if not timestamp: + raise Exception('Timestamp {} cannot be parsed'.format( + timestamp_str)) xml = SyncManager.generate_request_list( opening_post=options.get('thread'), tags=tags,