Skip to content

Conversation

@polypixeldev
Copy link
Member

Summary of the problem

We're currently only linking signed contracts to the organizer position in the on_contract_signed callback on invite, but this doesn't work before accepting an invite since the organizer position doesn't exist yet. Most contracts are signed before accepting the invite, since you can't accept an invite with a pending contract.

Describe your changes

Added linking contracts to OP in the accept method on invite, and fixed the send_contract method which was re-using the contract variable when it's already defined as a method on invite. This wasn't breaking anything so far, but it was performing an extra, unnecessary query.

@polypixeldev polypixeldev requested a review from a team December 19, 2025 01:25
Comment on lines +217 to +218
fs_contract.contract.parties.create!(user:, role: :signee)
fs_contract.contract.parties.create!(external_email: cosigner_email, role: :cosigner) if cosigner_email.present?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fs_contract does not have a contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants