Skip to content

Commit

Permalink
Fix saving settings
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekSuchanek committed Jan 12, 2025
1 parent 3ff9f64 commit 2094b5c
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,8 @@ private List<SettingsAutocompleteSource> updateSources(SettingsUpdateDTO dto, Se

private List<SettingsSearchFilter> updateSearchFilters(SettingsUpdateDTO dto, Settings settings) {
// Delete old
settings
.getSearchFilters()
.forEach(searchFilter -> searchFilterItemRepository.deleteAll(searchFilter.getItems()));
searchFilterRepository.deleteAll(settings.getSearchFilters());
entityManager.flush();
// Add new
final List<SettingsSearchFilter> searchFilters = new ArrayList<>();
final List<SearchFilterDTO> dtos = dto.getSearch().getFilters();
Expand Down

1 comment on commit 2094b5c

@dennisvang
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MarekSuchanek , could you link this to an issue, with problem description, so that we can understand what is being fixed? Thanks in advance. :)

Please sign in to comment.