Skip to content

Commit c0aa2de

Browse files
authored
Merge pull request #1419 from KatrinIhler/fix-series-rights-for-new-events-again
Fix series rights for new events - properly this time
2 parents 510db47 + 4009322 commit c0aa2de

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import ModalContentTable from "../../../shared/modals/ModalContentTable";
2929
* This component renders the access page for new events and series in the wizards.
3030
*/
3131
interface RequiredFormProps {
32-
isPartOf: string,
32+
'dublincore/episode_isPartOf': string,
3333
acls: TransformedAcl[],
3434
aclTemplate: string,
3535
// theme: string,
@@ -77,14 +77,15 @@ const NewAccessPage = <T extends RequiredFormProps>({
7777

7878
// If we have to use series ACL, fetch it
7979
useEffect(() => {
80-
if (initEventAclWithSeriesAcl && formik.values.isPartOf) {
81-
dispatch(fetchSeriesDetailsAcls(formik.values.isPartOf));
80+
if (initEventAclWithSeriesAcl && formik.values['dublincore/episode_isPartOf']) {
81+
dispatch(fetchSeriesDetailsAcls(formik.values['dublincore/episode_isPartOf']));
8282
}
83-
}, [formik.values.isPartOf, initEventAclWithSeriesAcl, dispatch]);
83+
// eslint-disable-next-line react-hooks/exhaustive-deps
84+
}, [formik.values['dublincore/episode_isPartOf'], initEventAclWithSeriesAcl, dispatch]);
8485

8586
// If we have to use series ACL, overwrite existing rules
8687
useEffect(() => {
87-
if (initEventAclWithSeriesAcl && formik.values.isPartOf && seriesAcl) {
88+
if (initEventAclWithSeriesAcl && formik.values['dublincore/episode_isPartOf'] && seriesAcl) {
8889
formik.setFieldValue("acls", seriesAcl)
8990
}
9091
// eslint-disable-next-line react-hooks/exhaustive-deps

0 commit comments

Comments
 (0)