diff --git a/src/rtmilk/mirror.py b/src/rtmilk/mirror.py index d06f014..b842605 100644 --- a/src/rtmilk/mirror.py +++ b/src/rtmilk/mirror.py @@ -40,22 +40,24 @@ async def _MirrorPropertyAsync(property_, value): def _MirrorTask(task, taskData): _MirrorProperty(task.tags, taskData.tags) try: - _MirrorProperty(task.startDate, taskData.startDate) + # Move the due date first because you're more likely to be moving both dates to be later _MirrorProperty(task.dueDate, taskData.dueDate) + _MirrorProperty(task.startDate, taskData.startDate) except RTMError: - _MirrorProperty(task.dueDate, taskData.dueDate) _MirrorProperty(task.startDate, taskData.startDate) + _MirrorProperty(task.dueDate, taskData.dueDate) if taskData.complete is not None: _MirrorProperty(task.complete, taskData.complete) async def _MirrorTaskAsync(task, taskData): await _MirrorPropertyAsync(task.tags, taskData.tags) try: - await _MirrorPropertyAsync(task.startDate, taskData.startDate) + # Move the due date first because you're more likely to be moving both dates to be later await _MirrorPropertyAsync(task.dueDate, taskData.dueDate) + await _MirrorPropertyAsync(task.startDate, taskData.startDate) except RTMError: - await _MirrorPropertyAsync(task.dueDate, taskData.dueDate) await _MirrorPropertyAsync(task.startDate, taskData.startDate) + await _MirrorPropertyAsync(task.dueDate, taskData.dueDate) if taskData.complete is not None: await _MirrorPropertyAsync(task.complete, taskData.complete)