Skip to content

Commit

Permalink
Fix some nullability errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Apr 29, 2022
1 parent f1c5944 commit affd5fa
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Coalesce.Domain/Person.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public override ItemResult BeforeSave(SaveKind kind, Person? oldItem, Person ite

if (item.FirstName?.Contains("[user]") ?? false)
{
item.FirstName = item.FirstName.Replace("[user]", User?.Identity.Name);
item.FirstName = item.FirstName.Replace("[user]", User?.Identity?.Name);
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using IntelliTect.Coalesce.DataAnnotations;
using IntelliTect.Coalesce.Tests.TargetClasses.TestDbContext;

#nullable enable

namespace IntelliTect.Coalesce.Tests.TargetClasses
{
[Coalesce]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Text;
using System.Threading.Tasks;

#nullable enable

namespace IntelliTect.Coalesce.Tests.TargetClasses
{
[Coalesce, Service]
Expand Down
2 changes: 1 addition & 1 deletion src/IntelliTect.Coalesce/Application/SecurityOverview.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h1 id="top" class="display-1 text-center">Coalesce Security Overview</h1>

<div id="app" class="mt-1" v-cloak>
<div class="row m-0">
<div class="col" style="max-width: 220px">
<div class="col" style="max-width: 240px">
<nav
class="toc p-2"
style="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace IntelliTect.Coalesce.TypeDefinition
{
public class PropertySecurityPermission : SecurityPermissionBase
{
private readonly Func<PropertyViewModel, HashSet<PropertyViewModel>, bool?>? computeIsUnused;
private readonly Func<PropertyViewModel, HashSet<PropertyViewModel>, bool?> computeIsUnused;
private PropertyViewModel prop { get; }

internal PropertySecurityPermission(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public IReadOnlyList<string> RoleList
}

// For inclusion of the string representation when serializing
public string Display => ToString();
public string Display => ToString() ?? "";

public string ToStringWithName() => $"{Name}: {ToString()}";

Expand Down

0 comments on commit affd5fa

Please sign in to comment.