Skip to content

Commit 225f855

Browse files
committed
Projects: retrieve notes from associated contacts as well.
1 parent 12f785a commit 225f855

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

exe/fa

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,10 @@ module Freeagent
216216
api.projects(contact: contact).select do |project|
217217
names.empty? || names.include?(project.name)
218218
end.each do |project|
219+
project.contact = contacts[project.contact]
219220
if options[:notes]
220221
project.notes = api.notes(project: project.url)
222+
project.contact.notes = api.notes(contact: project.contact.url)
221223
end
222224

223225
puts case options[:format].downcase

lib/freeagent.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def contacts view: nil, updated_since: nil, sort: nil
207207
get_pages('contacts', **params).flat_map(&:contacts)
208208
end
209209

210-
def contact
210+
def contact id
211211
get('contacts', id).contact
212212
end
213213

0 commit comments

Comments
 (0)