Bug Description
Command notion db query <database_id> fails with error:
"'Query' object is not callable"
Root Cause
The code uses db.query().execute() but according to ultimate_notion API:
Database.query is a property (not a method), so it returns a Query object directly
- To execute:
db.query.execute() NOT db.query().execute()
File Affected
src/notion_cli/commands/database.py line 64
Expected Behavior
notion db query <id> should return database entries
Reproduction
notion db query "400821ec-bbb5-4f69-b1d1-7af3e99a0264" --json
# Returns: {"success": false, "error": {"code": "DB_QUERY_ERROR", "message": "'Query' object is not callable"}}
Suggested Fix
# Wrong:
results = db.query().execute()
# Correct:
results = db.query.execute()
Reference
From ultimate_notion docs:
db.query is a property that returns a Query object
Query.execute() executes the query and returns results
Bug Description
Command
notion db query <database_id>fails with error:Root Cause
The code uses
db.query().execute()but according to ultimate_notion API:Database.queryis a property (not a method), so it returns aQueryobject directlydb.query.execute()NOTdb.query().execute()File Affected
src/notion_cli/commands/database.pyline 64Expected Behavior
notion db query <id>should return database entriesReproduction
Suggested Fix
Reference
From ultimate_notion docs:
db.queryis a property that returns aQueryobjectQuery.execute()executes the query and returns results