Skip to content

Commit b93e591

Browse files
authored
fix(webapi): Correctly handle deleted filter null value on ServiceOwner search (#1826)
<!--- Provide a general summary of your changes in the Title above --> ## Description `?deleted` and `?deleted=` query params on ServiceOwner search is not handled as default (exclude) <!--- Describe your changes in detail --> ## Related Issue(s) - #1825 ## Verification - [ ] **Your** code builds clean without any errors or warnings - [ ] Manual testing done (required) - [ ] Relevant automated test added (if you find this hard, leave it and we'll help out) ## Documentation - [ ] Documentation is updated (either in `docs`-directory, Altinnpedia or a separate linked PR in [altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if applicable)
1 parent e2665ca commit b93e591

File tree

1 file changed

+6
-1
lines changed
  • src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Search

1 file changed

+6
-1
lines changed

src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Search/SearchDialogQuery.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,17 @@ public sealed class SearchDialogQuery : SortablePaginationParameter<SearchDialog
5252
/// </summary>
5353
public List<DialogStatus.Values>? Status { get; init; }
5454

55+
private DeletedFilter? _deleted = DeletedFilter.Exclude;
5556
/// <summary>
5657
/// If set to 'include', the result will include both deleted and non-deleted dialogs
5758
/// If set to 'exclude', the result will only include non-deleted dialogs
5859
/// If set to 'only', the result will only include deleted dialogs
5960
/// </summary>
60-
public DeletedFilter? Deleted { get; set; } = DeletedFilter.Exclude;
61+
public DeletedFilter? Deleted
62+
{
63+
get => _deleted;
64+
set => _deleted = value ?? DeletedFilter.Exclude;
65+
}
6166

6267
/// <summary>
6368
/// Only return dialogs created after this date

0 commit comments

Comments
 (0)