From b0738c3c74ccfba4af0258d4f26370564127cfdc Mon Sep 17 00:00:00 2001 From: Zack Hobson Date: Sun, 9 Aug 2009 10:59:49 -0700 Subject: [PATCH] Permit append to empty notes, closes #26. --- lib/hcl/day_entry.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/hcl/day_entry.rb b/lib/hcl/day_entry.rb index bfc6dbf..db72748 100644 --- a/lib/hcl/day_entry.rb +++ b/lib/hcl/day_entry.rb @@ -27,9 +27,14 @@ def self.from_xml xml def append_note new_notes # If I don't include hours it gets reset. # This doens't appear to be the case for task and project. + if notes.nil? + notes = new_notes + else + notes << " #{new_notes}" + end DayEntry.post("daily/update/#{id}", <<-EOD) - #{notes << " #{new_notes}"} + #{notes} #{hours} EOD