corrected selectedPreset to GUID
parent
d8c4b75376
commit
8751d269e1
|
|
@ -45,6 +45,7 @@ public class Presets {
|
|||
.build();
|
||||
|
||||
this.presets = new ArrayList<>();
|
||||
api.impersonateUser("ext_GedikSa");
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +64,7 @@ public class Presets {
|
|||
} else {
|
||||
allPresets();
|
||||
response.setPresets(presets);
|
||||
response.setSelectedPreset(presets.get(0));
|
||||
response.setSelectedPreset(entries.get(0).get(query.getFieldId("GUID")).toString());
|
||||
response.setUserPreferences(new UserPreferences(entries.get(0).get(query.getFieldId("Details")).toString(),
|
||||
entries.get(0).get(query.getFieldId("View")).toString(),
|
||||
entries.get(0).get(query.getFieldId("Language")).toString()));
|
||||
|
|
@ -73,7 +74,6 @@ public class Presets {
|
|||
}
|
||||
|
||||
public List<Preset> savePreset(Preset request) throws ARException, NotFoundError {
|
||||
api.impersonateUser("ext_GedikSa");
|
||||
var saveQuery = new Query.QueryBuilder(formDefault)
|
||||
.addFieldValue("FilterPresetName", 364000001, new Value(request.getName()))
|
||||
.addFieldValue("FilterPresetDefinition", 364000002, new Value(request.getDefinition()))
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ import java.util.List;
|
|||
|
||||
public class PresetsGetResponse {
|
||||
private List<Preset> presets;
|
||||
private Preset selectedPreset;
|
||||
private String selectedPreset;
|
||||
private UserPreferences userPreferences;
|
||||
|
||||
public PresetsGetResponse(List<Preset> list, Preset selectedPresets, UserPreferences userPreferences) {
|
||||
public PresetsGetResponse(List<Preset> list, String selectedPresets, UserPreferences userPreferences) {
|
||||
this.presets = new ArrayList<>();
|
||||
this.selectedPreset = selectedPresets;
|
||||
this.userPreferences = userPreferences;
|
||||
|
|
@ -25,11 +25,11 @@ public class PresetsGetResponse {
|
|||
this.presets = presets;
|
||||
}
|
||||
|
||||
public Preset getSelectedPreset() {
|
||||
public String getSelectedPreset() {
|
||||
return this.selectedPreset;
|
||||
}
|
||||
|
||||
public void setSelectedPreset(Preset selectedPreset) {
|
||||
public void setSelectedPreset(String selectedPreset) {
|
||||
this.selectedPreset = selectedPreset;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue