Coder Social home page Coder Social logo

Comments (3)

ramnes avatar ramnes commented on June 13, 2024 1

Hey Sergey, thanks for the kind words and for the issue.

Previously there was no error thrown if db_filter=None, but now there is body failed validation: body.filter should be an object or undefined, instead was null. error.

The error with None is intentional: some fields are actually meant to receive None as a value, e.g. if you want to remove an icon from a page, so we have to pass the None values. Since Python doesn't have such a thing as undefined, you have to avoid passing a None value that you don't want the API to receive. :)

I'd recommend to modify your code with something such as:

query = {"database_id": self.__db_id}
if db_filter:
    query["filter"] = db_filter
iterate_paginated_api(self.__notion.databases.query, **query)

Does it sound reasonable to you?

This code is stuck in a never-ending loop returning a list of DB items from 0 to 99 and never gets to the next portion

Good catch, thanks! Fix and release incoming.

from notion-sdk-py.

SCORE1387 avatar SCORE1387 commented on June 13, 2024 1

All good now, thanks for a quick reaction!

from notion-sdk-py.

ramnes avatar ramnes commented on June 13, 2024

This code is stuck in a never-ending loop returning a list of DB items from 0 to 99 and never gets to the next portion

Good catch, thanks! Fix and release incoming.

Released. Can you try 2.2.1?

from notion-sdk-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.