Skip to content

Commit

Permalink
Permit append to empty notes, closes zenhob#26.
Browse files Browse the repository at this point in the history
  • Loading branch information
zenhob committed Aug 9, 2009
1 parent e935571 commit b0738c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/hcl/day_entry.rb
Expand Up @@ -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)
<request>
<notes>#{notes << " #{new_notes}"}</notes>
<notes>#{notes}</notes>
<hours>#{hours}</hours>
</request>
EOD
Expand Down

0 comments on commit b0738c3

Please sign in to comment.