Project

General

Profile

Revision 73fdb017

ID73fdb017d914506e6a76672baa26c4439f5b83a4
Parent 8f3c6043
Child baace0b5

Added by Katja Luther over 1 year ago

fix exception when publish flag preference is not set

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeWizardPage.java
16 16

  
17 17
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
18 18
import eu.etaxonomy.cdm.common.CdmUtils;
19
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
19 20
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
20 21
import eu.etaxonomy.cdm.model.name.INonViralName;
21 22
import eu.etaxonomy.cdm.model.reference.Reference;
......
142 143
			Reference reference = ((TaxonNodeDetailElement) getDetailElement()).getReference();
143 144
			INonViralName parseReferencedName = ParseHandler.parseReferencedName(taxonName, null);
144 145
			Taxon taxon = Taxon.NewInstance(parseReferencedName, reference);
145
			if (PreferencesUtil.getPreferenceFromDB(PreferencePredicate.DefaultBehaviourForPublishFlag).getValue().equals(Messages.PublishFlagPreference_set)){
146
			CdmPreference defaultPublish = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.DefaultBehaviourForPublishFlag);
147

  
148
			if (defaultPublish != null && defaultPublish.getValue().equals(Messages.PublishFlagPreference_set)){
146 149
			    taxon.setPublish(true);
147
			} else if (PreferencesUtil.getPreferenceFromDB(PreferencePredicate.DefaultBehaviourForPublishFlag).getValue().equals(Messages.PublishFlagPreference_do_not_set)){
150
			} else if (defaultPublish != null && defaultPublish.equals(Messages.PublishFlagPreference_do_not_set)){
148 151
			    taxon.setPublish(false);
149 152
			}else{
150 153
			    taxon.setPublish(((TaxonNode)this.getParentTreeNode()).getTaxon().isPublish());

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)