mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
implemented function 'get_contexts_for_repre_docs' to get representation contexts from already queried representations
This commit is contained in:
parent
778f2c09ad
commit
abbe7b7a36
1 changed files with 9 additions and 2 deletions
|
|
@ -87,13 +87,20 @@ def get_repres_contexts(representation_ids, dbcon=None):
|
|||
if not dbcon:
|
||||
dbcon = legacy_io
|
||||
|
||||
contexts = {}
|
||||
if not representation_ids:
|
||||
return contexts
|
||||
return {}
|
||||
|
||||
project_name = dbcon.active_project()
|
||||
repre_docs = get_representations(project_name, representation_ids)
|
||||
|
||||
return get_contexts_for_repre_docs(project_name, repre_docs)
|
||||
|
||||
|
||||
def get_contexts_for_repre_docs(project_name, repre_docs):
|
||||
contexts = {}
|
||||
if not repre_docs:
|
||||
return contexts
|
||||
|
||||
repre_docs_by_id = {}
|
||||
version_ids = set()
|
||||
for repre_doc in repre_docs:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue