Fix issues from merge
This commit is contained in:
parent
35c21e31c8
commit
0f5931555a
|
@ -77,7 +77,7 @@ function createAttribute($collectionId, $attribute, $response, $dbForInternal, $
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$attribute = $dbForInternal->createDocument('attributes', new Document([
|
$attribute = new Document([
|
||||||
'$id' => $collectionId.'_'.$attributeId,
|
'$id' => $collectionId.'_'.$attributeId,
|
||||||
'key' => $attributeId,
|
'key' => $attributeId,
|
||||||
'collectionId' => $collectionId,
|
'collectionId' => $collectionId,
|
||||||
|
@ -90,9 +90,8 @@ function createAttribute($collectionId, $attribute, $response, $dbForInternal, $
|
||||||
'array' => $array,
|
'array' => $array,
|
||||||
'format' => $format,
|
'format' => $format,
|
||||||
'formatOptions' => $formatOptions,
|
'formatOptions' => $formatOptions,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
try {
|
|
||||||
$dbForInternal->checkAttribute($collection, $attribute);
|
$dbForInternal->checkAttribute($collection, $attribute);
|
||||||
$attribute = $dbForInternal->createDocument('attributes', $attribute);
|
$attribute = $dbForInternal->createDocument('attributes', $attribute);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,14 +55,14 @@ class Collection extends Model
|
||||||
],
|
],
|
||||||
'description' => 'Collection attributes.',
|
'description' => 'Collection attributes.',
|
||||||
'default' => [],
|
'default' => [],
|
||||||
'example' => new stdClass,
|
'example' => new \stdClass,
|
||||||
'array' => true,
|
'array' => true,
|
||||||
])
|
])
|
||||||
->addRule('indexes', [
|
->addRule('indexes', [
|
||||||
'type' => Response::MODEL_INDEX,
|
'type' => Response::MODEL_INDEX,
|
||||||
'description' => 'Collection indexes.',
|
'description' => 'Collection indexes.',
|
||||||
'default' => [],
|
'default' => [],
|
||||||
'example' => new stdClass,
|
'example' => new \stdClass,
|
||||||
'array' => true
|
'array' => true
|
||||||
])
|
])
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue