Project

General

Profile

« Previous | Next » 

Revision b74a2730

Added by Katja Luther almost 5 years ago

ref #7920: fix delete of preferences

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
581 581
        try{
582 582
            if(CdmStore.isActive()){
583 583
                controller = CdmStore.getCurrentApplicationConfiguration();
584
                controller.getPreferenceService().set(preference);
584
                if (preference.getValue() == null && preference.isAllowOverride()){
585
                    controller.getPreferenceService().remove(preference.getKey());
586
                }else{
587
                    controller.getPreferenceService().set(preference);
588
                }
585 589
                CdmPreferenceCache.instance().put(preference);
586 590
            }
587 591
        }catch(Exception e){
......
1711 1715
            if(CdmStore.isActive()){
1712 1716
                controller = CdmStore.getCurrentApplicationConfiguration();
1713 1717
                for (CdmPreference preference: preferences){
1714
                    controller.getPreferenceService().set(preference);
1718
                    if (preference.getValue() == null && preference.isAllowOverride()){
1719
                        controller.getPreferenceService().remove(preference.getKey());
1720
                    }else{
1721
                        controller.getPreferenceService().set(preference);
1722
                    }
1715 1723
                    CdmPreferenceCache.instance().put(preference);
1716 1724
                }
1717 1725
            }

Also available in: Unified diff