You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I update an attribute using Databases.update#Attribute and pass in null for xdefault,
👍 Expected behavior
It should set the default value of that attribute to null.
👎 Actual Behavior
It actually throws an exception: AppwriteException: general_argument_invalid, Param "default" is not optional. (400)
I've found that modifying https://github.com/appwrite/sdk-for-dart/blob/master/lib/src/client_mixin.dart#L15 to params.removeWhere((key, value) => value == null && key != 'default'); locally fixes the issue. Looks like the default: null header is being removed before sending the http request, which is causing the exception. This does not seem like a good fix for the issue, but it narrows down where the issue is coming from.
🎲 Appwrite version
Version 0.10.x
💻 Operating system
MacOS
🧱 Your Environment
Using this in a CLI script to automatically update my attributes.
👀 Have you spent some time to check if this issue has been raised before?
👟 Reproduction steps
When I update an attribute using
Databases.update#Attribute
and pass innull
forxdefault
,👍 Expected behavior
It should set the default value of that attribute to
null
.👎 Actual Behavior
It actually throws an exception:
AppwriteException: general_argument_invalid, Param "default" is not optional. (400)
I've found that modifying https://github.com/appwrite/sdk-for-dart/blob/master/lib/src/client_mixin.dart#L15 to
params.removeWhere((key, value) => value == null && key != 'default');
locally fixes the issue. Looks like thedefault: null
header is being removed before sending the http request, which is causing the exception. This does not seem like a good fix for the issue, but it narrows down where the issue is coming from.🎲 Appwrite version
Version 0.10.x
💻 Operating system
MacOS
🧱 Your Environment
Using this in a CLI script to automatically update my attributes.
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: