From 38559c4efe0b8369165ac53c6791c4d27593da51 Mon Sep 17 00:00:00 2001 From: Tim Su Date: Fri, 2 Sep 2011 17:27:58 -0700 Subject: [PATCH] Fix for blank task creator id errors --- .../com/todoroo/astrid/actfm/sync/ActFmSyncService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java index 5dd6fbcf2..6b28e371d 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java @@ -24,6 +24,7 @@ import android.text.TextUtils; import android.util.Log; import android.widget.Toast; +import com.timsu.astrid.R; import com.todoroo.andlib.data.AbstractModel; import com.todoroo.andlib.data.DatabaseDao; import com.todoroo.andlib.data.DatabaseDao.ModelUpdateListener; @@ -798,8 +799,8 @@ public final class ActFmSyncService { public static void readUser(JSONObject user, AbstractModel model, LongProperty idProperty, StringProperty userProperty) throws JSONException { - long id = user.getLong("id"); - if(id == ActFmPreferenceService.userId()) { + long id = user.optLong("id", -1); + if(id == -1 || id == ActFmPreferenceService.userId()) { model.setValue(idProperty, 0L); if(userProperty != null) model.setValue(userProperty, "");