cleanup + notes for monday
This commit is contained in:
@@ -15,6 +15,7 @@ trait MayContainCustomFields
|
||||
});
|
||||
if (count($request_fields) > 0) {
|
||||
if ($this->method() == 'POST') {
|
||||
// refactor to eager load the fields???
|
||||
$request_fields->diff(AssetModel::find($this->model_id)->fieldset->fields->pluck('db_column'))
|
||||
->each(function ($request_field_name) use ($request_fields, $validator) {
|
||||
// i could probably add some more conditions here to determine whether or not the column exists but just not on this asset model
|
||||
@@ -23,9 +24,11 @@ trait MayContainCustomFields
|
||||
});
|
||||
} elseif ($this->method() == 'PUT' || $this->method() == 'PATCH') {
|
||||
// need to know about other pr before I can go down this route
|
||||
// it should be more or less the same, just have to get the asset model differently
|
||||
// ($this->asset should work if the other PR is accepted)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user