Jump to content

Removing a component from a Note


mitch.s

Recommended Posts

Removing a 'Note_Component'

Removing the component itself works fine.
I query the component by id to get the existing_component ;

server_location = session.query('Location where name is "ftrack.server"').one()
existing_component = session.query('Component where id is {0}'.format(COMPONENT_ID)).one()

server_location.remove_component(existing_component)
session.commit()

#must close after remove !
session.close()

 

but it seems like some data still remains in the Note_Component (a Note_Component without a Component ?)

Untitled.jpg.4ead5bb60cd8733379d15512987d7280.jpg

 

Do I need to clean this up by hand or is there a more straightforward method?
If by hand, how?

 

 

Link to comment
Share on other sites

  • 3 years later...

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
×
×
  • Create New...