Added extra verification to catch a maybe very rare error
This commit is contained in:
parent
a3d6ed337a
commit
4257fdbea0
@ -85,6 +85,18 @@ namespace bsmd.hisnord
|
|||||||
bool? retval;
|
bool? retval;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (core == null)
|
||||||
|
{
|
||||||
|
_log.ErrorFormat("CreateSendFile called with null core");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!core.Id.HasValue)
|
||||||
|
{
|
||||||
|
_log.ErrorFormat("CreateSendFile called with core that has no Id assigned");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
nsw _nsw = new nsw();
|
nsw _nsw = new nsw();
|
||||||
_nsw.conveyance = new conveyance();
|
_nsw.conveyance = new conveyance();
|
||||||
|
|
||||||
@ -121,8 +133,9 @@ namespace bsmd.hisnord
|
|||||||
_nsw.conveyance.owner_sender.contact.phone = rp.Phone;
|
_nsw.conveyance.owner_sender.contact.phone = rp.Phone;
|
||||||
_nsw.conveyance.owner_sender.contact.fax = rp.Fax;
|
_nsw.conveyance.owner_sender.contact.fax = rp.Fax;
|
||||||
|
|
||||||
_nsw.document_reference = core.Id.Value.ToString();
|
Guid coreId = core.Id.Value;
|
||||||
_nsw.conveyance.code = core.Id.ToString();
|
_nsw.document_reference = coreId.ToString();
|
||||||
|
_nsw.conveyance.code = coreId.ToString();
|
||||||
|
|
||||||
if (!core.VisitId.IsNullOrEmpty())
|
if (!core.VisitId.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user