Commit ebedc593670c071424793bc14402aa7cd541c662
Exists in
master
Merge branch 'master' of http://gitlab.nologostudio.ru/alarionov/rekamore-su
Showing 1 changed file Side-by-side Diff
app/Http/Controllers/EmployerController.php
... | ... | @@ -859,12 +859,14 @@ class EmployerController extends Controller |
859 | 859 | ); |
860 | 860 | |
861 | 861 | foreach ($request->get('vacancies') as $vacancy) { |
862 | - Ad_employer::query() | |
863 | - ->where('id', $vacancy['id']) | |
864 | - ->update([ | |
865 | - 'autolift_site' => $vacancy['autolift_site'] === 'true', //they're arriving as strings | |
866 | - 'autosend_tg' => $vacancy['autosend_tg'] === 'true', | |
867 | - ]); | |
862 | + if ($vacancy['autolift_site']) { | |
863 | + Ad_employer::query() | |
864 | + ->where('id', $vacancy['id']) | |
865 | + ->update([ | |
866 | + 'autolift_site' => $vacancy['autolift_site'] === 'true', //they're arriving as strings | |
867 | + 'autosend_tg' => $vacancy['autosend_tg'] === 'true', | |
868 | + ]); | |
869 | + } | |
868 | 870 | } |
869 | 871 | |
870 | 872 | return response(['success' => true]); |