Changeset ac51326


Ignore:
Timestamp:
02/05/21 00:50:18 (18 months ago)
Author:
Dimitar Slezenkovski <dslezenkovski@…>
Branches:
master
Children:
0a694bb
Parents:
afefe75
Message:

Fix null object reference error

Check if heads name is null, if null returns empty string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • FarmatikoServices/Services/Service.cs

    rafefe75 rac51326  
    9090                    Address = pharm.Address,
    9191                    WorkAllTime = pharm.WorkAllTime,
    92                     HeadName = pharm.PharmacyHead.Name
     92                    HeadName = pharm.PharmacyHead.Name?? ""
    9393                };
    9494                pharmacies.Add(pharmacyDTO);
Note: See TracChangeset for help on using the changeset viewer.