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
- Urgent help required - Could not resolve...
I upgraded my production environment to 1.8.0 but experienced issues with appwrite running out of worker threads. I downgraded back to 1.6.1 and restored the da...
- createMembership is not sending email wi...
Parameters should be correct. Account and Membership are successfully created. I have a next.js project with localhost origin allowed. I checked spam etc. i...
- Bulk delete failed with 401
- I created a transaction to bulk delete rows in a table has `done` equal `true` follow documentation. But when run, it returns 401 unauthorized error as screen...