~jpgleeson/caint

2966a9e215548b34f350577893cf3d6bc9d08a4f — jpgleeson 1 year, 5 months ago 6f3be0f
Handle null owner in thread.

Fixed crash that resulted from no owner being assigned to a thread. This was a legacy issue from updating the live database as I went without referencing the new owner id's.
1 files changed, 5 insertions(+), 3 deletions(-)

M Controllers/ThreadsController.cs
M Controllers/ThreadsController.cs => Controllers/ThreadsController.cs +5 -3
@@ 84,9 84,11 @@ namespace caint.Controllers
        {
            var tenantOwner = _context.tenants.Where(x => x.tenantName == tenant).FirstOrDefault();

            Console.WriteLine(tenantOwner.ownerId);

            return tenantOwner.ownerId;
            if (tenantOwner != null)
            {
                return tenantOwner.ownerId;
            }
            return null;
        }

        private static ThreadDTO ItemToDTO(Thread thread) =>