mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Prevent default values for array attributes
This commit is contained in:
@@ -76,6 +76,10 @@ function createAttribute($collectionId, $attribute, $response, $dbForInternal, $
|
||||
throw new Exception('Cannot set default value for required attribute', 400);
|
||||
}
|
||||
|
||||
if ($array && $default) {
|
||||
throw new Exception('Cannot set default value for array attributes', 400);
|
||||
}
|
||||
|
||||
try {
|
||||
$attribute = new Document([
|
||||
'$id' => $collectionId.'_'.$attributeId,
|
||||
@@ -1591,7 +1595,7 @@ App::post('/v1/database/collections/:collectionId/documents')
|
||||
$usage
|
||||
->setParam('database.documents.create', 1)
|
||||
->setParam('collectionId', $collectionId)
|
||||
;
|
||||
;
|
||||
|
||||
$audits
|
||||
->setParam('event', 'database.documents.create')
|
||||
|
||||
Reference in New Issue
Block a user