Skip to content

Conversation

@ortizjd
Copy link

@ortizjd ortizjd commented Dec 15, 2023

Fixes ASOC-2016

When creating a new AssetVersion, we now explicitly call UpdateAsset and set its defaultVersion to the new AssetVersion id in order to properly update that when using the SDK.

@nickvido nickvido changed the base branch from main to v0.1.3 December 18, 2023 15:56
"""
Call updateAsset to set the defaultVersion to the newly created AssetVersion
"""
def update_asset(token, organization_context, asset_id, asset_version_id):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation for any functions in the SDK are auto-generated, so we need to update this to have the correct format (see other functions for examples)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think the parameters should be named parameters, and make it clear that it is setting the default version, e.g. default_version=


response = send_graphql_query(token, organization_context, graphql_query, variables)

if response.ok:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: GraphQL return values can be HTTP "OK", but contain errors in the return value instead of "data". The send_graphql_query checks for this, and raises an exception with the errors if the response contains errors - I'll add a test for this, because the response is not a requests object, but the actual JSON that gets returned

@nickvido nickvido merged commit 3d23f44 into v0.1.3 Dec 19, 2023
@nickvido nickvido deleted the ASOC-2016 branch December 19, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants