From ea7bf0925ce0cd0324b8a8f555061e72c31a8043 Mon Sep 17 00:00:00 2001 From: Edward Hibbert Date: Mon, 7 Aug 2023 15:04:49 +0100 Subject: [PATCH] Event handler is looking for data which doesn't get passed --- app/Listeners/EditWordpressPostForEvent.php | 2 +- tests/Feature/Events/WordpressEventPushTest.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Listeners/EditWordpressPostForEvent.php b/app/Listeners/EditWordpressPostForEvent.php index b91dc035c4..50361ebb14 100644 --- a/app/Listeners/EditWordpressPostForEvent.php +++ b/app/Listeners/EditWordpressPostForEvent.php @@ -52,7 +52,7 @@ public function handle(EditEvent $event) $group = Group::where('idgroups', $theParty->group)->first(); $custom_fields = [ - ['key' => 'party_grouphash', 'value' => $data['group']], + ['key' => 'party_grouphash', 'value' => $theParty->group], ['key' => 'party_groupcountry', 'value' => Fixometer::getCountryFromCountryCode($group->country_code)], ['key' => 'party_groupcity', 'value' => $group->area], ['key' => 'party_venue', 'value' => $data['venue']], diff --git a/tests/Feature/Events/WordpressEventPushTest.php b/tests/Feature/Events/WordpressEventPushTest.php index b77ee4c3b6..5d522927ee 100644 --- a/tests/Feature/Events/WordpressEventPushTest.php +++ b/tests/Feature/Events/WordpressEventPushTest.php @@ -103,7 +103,6 @@ public function date_format_in_events() { 'event_end_utc' => Carbon::parse('4pm tomorrow')->toIso8601String(), 'latitude' => 1, 'longitude' => 2, - 'group' => 3, 'online' => FALSE, 'venue' => 'Cloud 9', 'location' => 'Cloud 10',