Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support marking an integration back as active #684

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/workspaces/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ def connect_qbo_oauth(refresh_token, realm_id, workspace_id):

workspace.save()

if workspace.onboarding_state == 'COMPLETE':
post_to_integration_settings(workspace_id, True)
Comment on lines +124 to +125
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Integration Settings Update on Reconnection

The addition of post_to_integration_settings(workspace_id, True) when workspace.onboarding_state == 'COMPLETE' ensures that the integration settings are updated when the onboarding process is complete. However, consider whether the integration settings should also be updated when a user reconnects their QuickBooks Online account, even if the onboarding state is not 'COMPLETE'. This would ensure that the integration status is accurate in all scenarios.


# Return the QBO credentials as serialized data
return Response(data=QBOCredentialSerializer(qbo_credentials).data, status=status.HTTP_200_OK)

Expand Down
Loading