summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorZack Hobson2009-08-09 10:59:49 -0700
committerZack Hobson2009-08-09 10:59:49 -0700
commitb0738c3c74ccfba4af0258d4f26370564127cfdc (patch)
tree60cc678d427ec853236ed3c6ab547bf77f525fd7 /lib
parente935571b7164d112a5e27589ff69cfec9cc13c24 (diff)
downloadhcl-b0738c3c74ccfba4af0258d4f26370564127cfdc.tar.bz2
Permit append to empty notes, closes #26.
Diffstat (limited to 'lib')
-rw-r--r--lib/hcl/day_entry.rb7
1 files changed, 6 insertions, 1 deletions
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 @@ module HCl
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)
<request>
- <notes>#{notes << " #{new_notes}"}</notes>
+ <notes>#{notes}</notes>
<hours>#{hours}</hours>
</request>
EOD