8000 Fix quote creation for manual symbols by afadil · Pull Request #307 · afadil/wealthfolio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix quote creation for manual symbols #307

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

Merged
merged 1 commit into from
Jun 27, 2025
Merged

Fix quote creation for manual symbols #307

merged 1 commit into from
Jun 27, 2025

Conversation

afadil
Copy link
Owner
@afadil afadil commented Jun 19, 2025

Summary

  • adjust order of actions when adding or updating activities so the related asset exists before saving quotes

Testing

  • npm test

https://chatgpt.com/codex/tasks/task_e_68547bbfff048324accce31a3d713663

@afadil afadil added the codex label Jun 19, 2025 — with ChatGPT Connector
@afadil afadil requested a review from Copilot June 19, 2025 21:18
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ensures that an activity is created or updated before a corresponding quote is generated, preserving proper asset existence for manual symbols.

  • The add activity mutation now creates the activity first then creates the quote.
  • The update activity mutation follows a similar order change.
Comments suppressed due to low confidence (2)

src/pages/activity/hooks/use-activity-mutations.ts:80

  • In the add activity mutation, if createQuoteFromActivity fails after the activity has been created, consider implementing error handling or a rollback mechanism to maintain data consistency.
      const activity = await createActivity(rest);

src/pages/activity/hooks/use-activity-mutations.ts:89

  • For the update activity mutation, ensure there is a strategy to handle failures in createQuoteFromActivity after updating the activity, to keep the activity and quote data in sync.
      const activity = await updateActivity(data);

@afadil afadil merged commit 9ab4b3e into main Jun 27, 2025
@afadil afadil deleted the codex/fix-issue-#300 branch June 27, 2025 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0