It’s saying it’s missing the required fields code, tags and data
ayon_api.post should be passing the kwargs as the json argument to the post request. Whether that’s correct here I have no idea (I’m not knowledgeable about web requests at all). I wonder if trying ayon_api.raw_post instead may help here.
@martin.wacker might know better what the exact request should be here.
So it seems i had misspelled the tags key now that i have fixed it i still keep getting
[{‘loc’: (‘query’, ‘code’), ‘msg’: ‘field required’, ‘type’: ‘value_error.missing’}]
but i ame passing that value to it.
async def check_sg_playlist_data_table(project_name: str) -> None:
"""Checks for existence of `sg_playlist_data` table, creates if not."""
logging.info(f'check_sg_playlist_data_table: {project_name}')
await Postgres.execute(
f"CREATE TABLE IF NOT EXISTS project_{project_name}.sg_playlist_data (code VARCHAR NOT NULL,tags JSONB NOT NULL,data JSONB NOT NULL);"
)
So this is the db creating i have, it seems its not picking up the correct data type, if i change it to JSONB and pass a dict it seems to work, any idea as how to pass a string?