This repository was archived by the owner on May 5, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
sormas-app/app/src/main/java/de/symeda/sormas/app/backend Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ public static void clearTables(boolean clearInfrastructure) {
209209 TableUtils .clearTable (connectionSource , Outbreak .class );
210210 TableUtils .clearTable (connectionSource , SyncLog .class );
211211 TableUtils .clearTable (connectionSource , DiseaseClassificationCriteria .class );
212- TableUtils .createTable (connectionSource , CampaignFormData .class );
212+ TableUtils .clearTable (connectionSource , CampaignFormData .class );
213213
214214 if (clearInfrastructure ) {
215215 TableUtils .clearTable (connectionSource , User .class );
@@ -221,8 +221,8 @@ public static void clearTables(boolean clearInfrastructure) {
221221 TableUtils .clearTable (connectionSource , Community .class );
222222 TableUtils .clearTable (connectionSource , District .class );
223223 TableUtils .clearTable (connectionSource , Region .class );
224- TableUtils .createTable (connectionSource , Campaign .class );
225- TableUtils .createTable (connectionSource , CampaignFormMeta .class );
224+ TableUtils .clearTable (connectionSource , Campaign .class );
225+ TableUtils .clearTable (connectionSource , CampaignFormMeta .class );
226226
227227 ConfigProvider .init (instance .context );
228228 }
Original file line number Diff line number Diff line change 11package de .symeda .sormas .app .backend .infrastructure ;
22
3+ import de .symeda .sormas .api .feature .FeatureType ;
34import de .symeda .sormas .api .infrastructure .InfrastructureChangeDatesDto ;
45import de .symeda .sormas .api .infrastructure .InfrastructureSyncDto ;
56import de .symeda .sormas .app .backend .campaign .CampaignDtoHelper ;
@@ -53,7 +54,9 @@ public static void handlePulledInfrastructureData(InfrastructureSyncDto infrastr
5354 DatabaseHelper .getFeatureConfigurationDao ().delete (infrastructureData .getDeletedFeatureConfigurationUuids ());
5455 new FeatureConfigurationDtoHelper ()
5556 .handlePulledList (DatabaseHelper .getFeatureConfigurationDao (), infrastructureData .getFeatureConfigurations ());
56- new CampaignDtoHelper ().handlePulledList (DatabaseHelper .getCampaignDao (), infrastructureData .getCampaigns ());
57- new CampaignFormMetaDtoHelper ().handlePulledList (DatabaseHelper .getCampaignFormMetaDao (), infrastructureData .getCampaignFormMetas ());
57+ if (!DatabaseHelper .getFeatureConfigurationDao ().isFeatureDisabled (FeatureType .CAMPAIGNS )) {
58+ new CampaignDtoHelper ().handlePulledList (DatabaseHelper .getCampaignDao (), infrastructureData .getCampaigns ());
59+ new CampaignFormMetaDtoHelper ().handlePulledList (DatabaseHelper .getCampaignFormMetaDao (), infrastructureData .getCampaignFormMetas ());
60+ }
5861 }
5962}
You can’t perform that action at this time.
0 commit comments