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] No guardian on delete #297

Merged
merged 2 commits into from
Jul 30, 2023
Merged

[Fix] No guardian on delete #297

merged 2 commits into from
Jul 30, 2023

Conversation

leogjhuang
Copy link
Collaborator

Notion ticket link

Unable to create a new permanent permit for an existing temporary permit user
Unable to create a new temporary permit for an existing temporary permit user

Implementation description

  • Turns out the issue with creating permits for existing users does not have to do with permanent/temporary
  • Bug is replicated when user has no guardian attached to existing permit and a new permit is created with no guardian
  • Attempts to delete the guardian field when it does not exist
  • Made changes to application processing resolver and error catching

Notes

  • N/A

Checklist

  • My PR name is descriptive, is in imperative tense and starts with one of the following: [Feature],[Improvement] or [Fix],
  • I have run the appropriate linter(s)
  • I have requested a review from the RCD team on GitHub, or specific people who are associated with this ticket

@@ -331,7 +331,7 @@ export const completeApplication: Resolver<
},
},
}
: { guardian: { delete: true } }),
: {}),
Copy link
Member

Choose a reason for hiding this comment

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

Should we still account for the case where there was previously a guardian, but the new application does not contain a guardian? There should still be a delete right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Addressed this case by adding disconnect.

Copy link
Member

Choose a reason for hiding this comment

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

From what I understand this removes the mapping between the permit and the guardian, but there will be an orphaned guardian in the DB right? Ideally that should be cleaned up too.

@leogjhuang leogjhuang merged commit 4efaf30 into staging Jul 30, 2023
1 check passed
@leogjhuang leogjhuang deleted the lh/fix-no-guardian branch July 30, 2023 20:50
leogjhuang added a commit that referenced this pull request Jul 30, 2023
* [Fix] No guardian on delete

* Change delete to disconnect
leogjhuang added a commit that referenced this pull request Jul 30, 2023
* Allow numbers in MSP (#296)
* [Fix] Broken contact us link (#298)
* change nam and address spacing to absolute instead of floating (#300)
* Go to applicationProcessing instead of application (#301)
* update shopify version to undeprecated one (#302)
* Fix bash command for Windows (#299)
* Update shopify-buy in yarn.lock (#303)
* [Fix] No guardian on delete (#297)
* Update processing fee from $26 to $31 (#305)
* [Feature] Support search by permit ID on Permit Holders page (#307)
* Change pdf address spacing from 1.5 to 1.4 (#306)
leogjhuang added a commit that referenced this pull request Jul 31, 2023
* Allow numbers in MSP (#296)
* [Fix] Broken contact us link (#298)
* change nam and address spacing to absolute instead of floating (#300)
* Go to applicationProcessing instead of application (#301)
* update shopify version to undeprecated one (#302)
* Fix bash command for Windows (#299)
* Update shopify-buy in yarn.lock (#303)
* [Fix] No guardian on delete (#297)
* Update processing fee from $26 to $31 (#305)
* [Feature] Support search by permit ID on Permit Holders page (#307)
* Change pdf address spacing from 1.5 to 1.4 (#306)
* [Fix] Update form links to reflect new processing fee (#309)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants