Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Modules/AdministratorModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ internal static int CalculateLogSkipCount(int page, int pageSize)
internal static bool TryParseOwnerId(string? value, out ulong ownerId)
{
ownerId = 0;
return !string.IsNullOrWhiteSpace(value) && ulong.TryParse(value, out ownerId);
return !string.IsNullOrWhiteSpace(value) &&
ulong.TryParse(value, out ownerId) &&
ownerId > 0;
}

internal static IReadOnlyList<string> BuildLogMessages(IEnumerable<string> lines)
Expand Down
1 change: 1 addition & 0 deletions Morpheus.Tests/AdministratorModuleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class AdministratorModuleTests
[InlineData(null)]
[InlineData("")]
[InlineData(" ")]
[InlineData("0")]
[InlineData("not-a-user-id")]
public void TryParseOwnerId_RejectsMissingOrInvalidValues(string? value)
{
Expand Down