Skip to content

🐛 Bug Report: remove default with required is true (Enums and maybe others) #111

@Sau1707

Description

@Sau1707

👟 Reproduction steps

from appwrite.client import Client
from appwrite.services.databases import Database

client.set_endpoint("<Endpoint>")
client.set_project("<Project>") 
client.set_key('standard_xxx')  

client = Client()

db = Databases(client)
db.update_enum_attribute(
    database_id=database_id,
    collection_id=collection_id,
    key=key,
    elements=elements,
    required=True,
    default=None
)

👍 Expected behavior

It should allow to update the field without a default parameter when required is set to true.

👎 Actual Behavior

Editor complains about the type:
Argument of type "None" cannot be assigned to parameter "default" of type "str" in function "update_enum_attribute"

Execution error:
Error: Param "default" is not optional.

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Windows

🧱 Your Environment

Python 3.13.1 (venv)
appwrite-11.0.0

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions