Feature/custom fields default values (#5389)
* Fixes CustomFieldsetsController::fields() which I think is not used anywhere else and don't think ever worked as you can't call get() on a Collection. Have tested extensively and doesn't seem to affect anywhere else? * Adds default value functionality * Adds built assets * Fixes assignment to asset_model_id which should have been evaluation and alters route so it sits more in line with existing work * Updates built assets * Remove silly docker.env file; fix Dockerfile to preserve Oauth keys (#5377) * Added department to custom asset export Updates build assets * Adds translation support for 'add default values' checkbox label
This commit is contained in:
@@ -98,6 +98,11 @@ class AssetModel extends SnipeModel
|
||||
return $this->belongsTo('\App\Models\CustomFieldset', 'fieldset_id');
|
||||
}
|
||||
|
||||
public function defaultValues()
|
||||
{
|
||||
return $this->belongsToMany('\App\Models\CustomField', 'models_custom_fields')->withPivot('default_value');
|
||||
}
|
||||
|
||||
|
||||
public function getImageUrl() {
|
||||
if ($this->image) {
|
||||
|
||||
Reference in New Issue
Block a user