Fix #8083: Follow-up fix to add glossary terms (#9191)

This commit is contained in:
Sriharsha Chintalapani 2022-12-07 03:03:38 -08:00 committed by GitHub
parent 8f5dd22617
commit 26a4176851
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,13 +105,12 @@ public class GlossaryTermRepository extends EntityRepository<GlossaryTerm> {
// Validate parent term
EntityReference parentTerm = Entity.getEntityReference(entity.getParent());
entity.setParent(parentTerm);
validateHierarchy(entity);
// Validate glossary
Glossary glossary = Entity.getEntity(entity.getGlossary(), "reviewers", Include.NON_DELETED);
entity.setGlossary(glossary.getEntityReference());
validateHierarchy(entity);
// If reviewers is not set in the glossary term, then carry it from the glossary
entity.setReviewers(entity.getReviewers() == null ? glossary.getReviewers() : entity.getReviewers());