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: exception when saving user #277

Merged
merged 1 commit into from
Oct 25, 2023
Merged

Conversation

crnkovic
Copy link
Contributor

Summary

https://app.clickup.com/t/862kh364f

If no permissions have been selected, the permissions key in the payload will be null. We used Arr::get() which will return the value if it exists, and since it does exist (but it's null), the exception happens.

I used null coalesce operator, which will default to an empty array if value doesn't exist or is null.

Checklist

  • I checked my UI changes against the design and there are no notable differences
  • I checked my UI changes for any responsiveness issues
  • I checked my (code) changes for obvious issues, debug statements and commented code
  • I opened a corresponding card on Clickup for any remaining TODOs in my code
  • I added a short description on how to test this PR (if necessary)
  • I added a storybook entry for the component that was added (if necessary)
  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@ItsANameToo ItsANameToo merged commit f5b02e5 into feat/articles Oct 25, 2023
12 checks passed
@ItsANameToo ItsANameToo deleted the fix/permissions branch October 25, 2023 13:11
@ItsANameToo ItsANameToo added this to the 0.10.0 milestone Oct 25, 2023
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.

2 participants