go-notion icon indicating copy to clipboard operation
go-notion copied to clipboard

Excessive entry of People User Type in DatabasePageProperty struct issue

Open ian-lss opened this issue 2 years ago • 0 comments

In the CreatePage function, when data is entered in the People type of the Type database, due to excessive DatabasePageProperty->People User struct item body.properties.People.people[0].type should be not present, instead was "". body.properties.People.people[0].name should be not present, instead was "". body.properties.People.people[0].avatar_url should be not present, instead was "". body.properties.People.people[0].person should be not present or an object, instead was null. body.properties.People.people[0].bot should be not present or an object, instead was null. (code: validation_error, status: 400) error occurs. However, It can be solved by adding omitempty to each json item of User struct.

ian-lss avatar Nov 14 '22 16:11 ian-lss