diff --git a/gehGassi.Dto/Walks/PublicWalkRequestAcceptDto.cs b/gehGassi.Dto/Walks/PublicWalkRequestAcceptDto.cs index 54bb222..1ae4a5d 100644 --- a/gehGassi.Dto/Walks/PublicWalkRequestAcceptDto.cs +++ b/gehGassi.Dto/Walks/PublicWalkRequestAcceptDto.cs @@ -40,6 +40,6 @@ namespace gehGassi.Dto.Walks /// /// Zahlungsart für den Walk /// - public WalkPaymentTypeDto PaymentType { get; set; } + public WalkPaymentTypeDto? PaymentType { get; set; } } } diff --git a/gehGassi.Dto/Walks/WalkCreateDto.cs b/gehGassi.Dto/Walks/WalkCreateDto.cs index 9cc8ebb..3b19c39 100644 --- a/gehGassi.Dto/Walks/WalkCreateDto.cs +++ b/gehGassi.Dto/Walks/WalkCreateDto.cs @@ -105,6 +105,6 @@ namespace gehGassi.Dto.Walks /// /// Zahlungsart für den Walk /// - public WalkPaymentTypeDto PaymentType { get; set; } + public WalkPaymentTypeDto? PaymentType { get; set; } } } diff --git a/gehGassi.Web/Controllers/Api/ApiWalksController.cs b/gehGassi.Web/Controllers/Api/ApiWalksController.cs index 6977608..740ee77 100644 --- a/gehGassi.Web/Controllers/Api/ApiWalksController.cs +++ b/gehGassi.Web/Controllers/Api/ApiWalksController.cs @@ -1039,7 +1039,7 @@ namespace gehGassi.Web.Controllers.Api walk.CompletedInfo = string.Empty; walk.Defactation = false; walk.PaymentStatus = PaymentStatus.Pending; - walk.PaymentType = (WalkPaymentType)model.PaymentType; + walk.PaymentType = model.PaymentType != null ? (WalkPaymentType)model.PaymentType : WalkPaymentType.MangoPay; walk.UpdatedAt = DateTimeOffset.UtcNow; walk.Created = DateTimeOffset.UtcNow; @@ -3630,7 +3630,7 @@ namespace gehGassi.Web.Controllers.Api walk.CompletedInfo = string.Empty; walk.Defactation = false; walk.PaymentStatus = PaymentStatus.Pending; - walk.PaymentType = (WalkPaymentType)model.PaymentType; + walk.PaymentType = model.PaymentType != null ? (WalkPaymentType)model.PaymentType : WalkPaymentType.MangoPay; walk.UpdatedAt = DateTimeOffset.UtcNow; walk.Created = DateTimeOffset.UtcNow; @@ -3810,7 +3810,7 @@ namespace gehGassi.Web.Controllers.Api walk.CompletedInfo = string.Empty; walk.Defactation = false; walk.PaymentStatus = PaymentStatus.None; - walk.PaymentType = (WalkPaymentType)model.PaymentType; + walk.PaymentType = model.PaymentType != null ? (WalkPaymentType)model.PaymentType : WalkPaymentType.MangoPay; walk.UpdatedAt = DateTimeOffset.UtcNow; walk.Created = DateTimeOffset.UtcNow;