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
- All My Project is Gone
Hello everyone, please help. Why have all my projects suddenly disappeared? I received a warning via email about one of my projects being paused. When I clicked...
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...
- > AppwriteException: The requested servi...
When trying to read or write from my database I get the following error: > AppwriteException: The requested service is disabled. You can enable the service from...