Querying custom attributes
0

3 posts in this topic

Hi,

I'm trying to filter assetversion using custom attribute, but got an error:

error.thumb.png.4a5875592262463c075a7f9db390dd7b.png

As you can see when I inspect the custom_attributes of a version object it did show me the "downstream" attribute is there.  Did I miss something?

Also, how to compare a bool value? Am I using it right?

 

Cheers, 

John

Share this post


Link to post
Share on other sites

Hi there,

you have to specify key, value pairs if you want to query custom attributes and metadata. The right syntax is

s.query('AssetVersion where custom_attributes any (key=downstream and value=True)').first()

Also notice that bools are written in upper case. So true won't work as value.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0