[FIX] fix when no sale channel name

This commit is contained in:
miguelpadin
2022-11-25 21:49:05 +01:00
committed by Darío Lodeiros
parent 65fe97a07e
commit ccceea606f
2 changed files with 2 additions and 2 deletions

View File

@@ -15,4 +15,4 @@ class PmsNotificationInfo(Datamodel):
timeStamp = fields.Integer(required=False)
folioName = fields.String(required=False)
partnerName = fields.String(required=False)
saleChannelName = fields.String(required=False)
saleChannelName = fields.String(required=False, allow_none=True)

View File

@@ -54,7 +54,7 @@ class PmsNotificationService(Component):
partnerName=folio.partner_name,
saleChannelName=folio.agency_id.name
if folio.agency_id
else folio.sale_channel_origin_id.name,
else folio.sale_channel_origin_id.name or None,
)
)
return notifications