mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
cleanup + notes for monday
This commit is contained in:
parent
52340aca78
commit
997eddfed1
|
@ -38,8 +38,6 @@ class StoreAssetRequest extends ImageUploadRequest
|
|||
'company_id' => $idForCurrentUser,
|
||||
'assigned_to' => $assigned_to ?? null,
|
||||
]);
|
||||
|
||||
//$this->after();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue