From 9cb8e865fc47495bed70c83ec3172f4bc19ddd5b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 6 Apr 2021 08:21:55 +1000 Subject: [PATCH] Fixes for assigned_user_id and group_id not sticking to subscriptions --- .../Requests/Subscription/StoreSubscriptionRequest.php | 2 ++ .../Requests/Subscription/UpdateSubscriptionRequest.php | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/app/Http/Requests/Subscription/StoreSubscriptionRequest.php b/app/Http/Requests/Subscription/StoreSubscriptionRequest.php index f79ed33f7d..7e9622f30c 100644 --- a/app/Http/Requests/Subscription/StoreSubscriptionRequest.php +++ b/app/Http/Requests/Subscription/StoreSubscriptionRequest.php @@ -64,6 +64,8 @@ class StoreSubscriptionRequest extends Request { $input = $this->all(); + $input = $this->decodePrimaryKeys($input); + $this->replace($input); } } diff --git a/app/Http/Requests/Subscription/UpdateSubscriptionRequest.php b/app/Http/Requests/Subscription/UpdateSubscriptionRequest.php index c2e5ba47b7..bd5e45aebe 100644 --- a/app/Http/Requests/Subscription/UpdateSubscriptionRequest.php +++ b/app/Http/Requests/Subscription/UpdateSubscriptionRequest.php @@ -42,4 +42,13 @@ class UpdateSubscriptionRequest extends Request return $this->globalRules($rules); } + + protected function prepareForValidation() + { + $input = $this->all(); + + $input = $this->decodePrimaryKeys($input); + + $this->replace($input); + } }