akarri2001 / Notion-and-Google-Calendar-2-Way-Sync

2 Way Sync Between Notion Database and Google Calendar
GNU General Public License v3.0
352 stars 50 forks source link

Can't update entries trough Notion [Part 2 not working] #33

Open astronaut954 opened 4 months ago

astronaut954 commented 4 months ago

THE ISSUE: In short, my python script won't allow any update in an already existing event through Notion. The "Part 2" of the script doesn't work.

DETAILS OF THE ISSUE: Whenever I try to update an event on Notion the "result_list" variable (just after the attribution of the variable "my_page") it returns an empty list, so it isn't running both "if" blocks from the part 2:

if len(resultList) > 0:
    for i, el in enumerate(resultList):
        pageId = el['id']
        my_page = notion.pages.update( ##### This checks off that the event has been put on Google Calendar
            **{
                "page_id": pageId, 
                "properties": {
                    Calendar_Notion_Name:  { 
                        'select': {
                            "name": DEFAULT_CALENDAR_NAME
                        },
                    },
                    LastUpdatedTime_Notion_Name: {
                        "date":{
                            'start': notion_time(),
                            'end': None,
                        }
                    }, 
                },
            },
        )

WHAT HAS BEEN OBSERVED: