mirror of https://github.com/Hoffelhas/autodoist
parent
54f770f5f7
commit
5554c636d9
|
@ -104,10 +104,11 @@ def main():
|
||||||
if args.hide_future > 0 and 'due_date_utc' in item.data and item['due_date_utc'] is not None:
|
if args.hide_future > 0 and 'due_date_utc' in item.data and item['due_date_utc'] is not None:
|
||||||
due_date = datetime.strptime(item['due_date_utc'], '%a %d %b %Y %H:%M:%S +0000')
|
due_date = datetime.strptime(item['due_date_utc'], '%a %d %b %Y %H:%M:%S +0000')
|
||||||
future_diff = (due_date - datetime.utcnow()).total_seconds()
|
future_diff = (due_date - datetime.utcnow()).total_seconds()
|
||||||
if future_diff >= (args.hide_future * 86400) and label_id in labels:
|
if future_diff >= (args.hide_future * 86400):
|
||||||
labels.remove(label_id)
|
if label_id in labels:
|
||||||
logging.debug('Updating %s without label as its too far in the future', item['content'])
|
labels.remove(label_id)
|
||||||
item.update(labels=labels)
|
logging.debug('Updating %s without label as its too far in the future', item['content'])
|
||||||
|
item.update(labels=labels)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Process item
|
# Process item
|
||||||
|
|
Loading…
Reference in New Issue