
AppwriteException: general_argument_invalid, Param "default" is not optional. (400)

cc: @D5 We are using dart-sdk for performing this sync

Here is a code snippet for the same:
await dest.databases.updateStringAttribute(
databaseId: databaseId,
collectionId: collectionId,
key: attributeA.key,
size: attributeA.size!,
xrequired: attributeA.required,
xdefault:
attributeA.required ? null : (attributeA.defaultValue ?? ''),
);

if I write the xdefault
part like this:
xdefault: attributeA.defaultValue ?? '',
I get this error:
AppwriteException: attribute_default_unsupported, Cannot set default value for required attribute (400)

Hmm I think it can't be nul as it needs to be true or false?
Recommended threads
- Query.equal error
Hi guys. I'm using Appwrite Cloud, and I'm using version 21 of node-appwrite to benefit from transactions. The problem is I seem to be getting an error when I u...
- Invalid `success` param
Hi again, I've tried to set up the login process. However, I always get the message: `Invalid success param: URL host must be one of: localhost, xxx` I've alr...
- Is it possible to have multiple smtp on ...
I already have one in one project but is it possible to use different one in another?
