Skip to content

Commit

Permalink
Create draft invitation upon successful expense creation for non-osc …
Browse files Browse the repository at this point in the history
…collectives
  • Loading branch information
andrew committed Jan 24, 2025
1 parent fb2789b commit 8098b7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/project_allocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ def send_draft_expense_invitation_to_collective(collective_slug, amount_cents, d
puts "Draft expense created successfully and invitation sent:"
puts JSON.pretty_generate(response_body['data']['draftExpenseAndInviteUser'])
response_body['data']['draftExpenseAndInviteUser']
pp response_body
Invitation.create!(project_allocation: self, email: project.contact_email, status: 'DRAFT', member_invitation_id: response_body['data']['draftExpenseAndInviteUser']['legacyId'], data: response_body['data']['draftExpenseAndInviteUser'])
end
end

Expand Down

0 comments on commit 8098b7a

Please sign in to comment.