-
Notifications
You must be signed in to change notification settings - Fork 745
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 error that occurs if facilityDatasetExtraFields is null. #12534
Fix error that occurs if facilityDatasetExtraFields is null. #12534
Conversation
Build Artifacts
|
@@ -41,7 +41,7 @@ | |||
}, | |||
computed: { | |||
customSchema() { | |||
return this.facilityDatasetExtraFields.demographic_fields || []; | |||
return this.facilityDatasetExtraFields?.demographic_fields || []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we allow facilityDatasetExtraFields
to be null. Then this prop should not be marked as required right? https://github.com/rtibbles/kolibri/blob/787162af96d4af31dc23ec06d370692524679c42/packages/kolibri-common/components/ExtraDemographics/index.vue#L35
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, it is required - it's just that VueJS prop validation doesn't actually do anything in production, it's advisory to ensure that developers are using props appropriately. The issue arises because a value is passed in for the prop, but the value is null
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, well that makes sense haha, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Tested user creation (all types), user properties editing, user deletion, class assignment, both on the original and one newly created additional facility. All is 🟢 to go! 👏🏽 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM too! 💯 👍🏽
Summary
References
Fixes #12533
Reviewer guidance
Make sure that you can still load the demographic editing in the user editing in the admin UI.
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)