mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 06:12:19 +01:00
fix call and _call methods
This commit is contained in:
parent
92642639ab
commit
7db7453237
2 changed files with 15 additions and 8 deletions
|
|
@ -1731,13 +1731,20 @@ class SyncToAvalonEvent(BaseEvent):
|
|||
attributes_joined = ", ".join([
|
||||
"\"{}\"".format(name) for name in hier_cust_attrs_keys
|
||||
])
|
||||
[values] = self.process_session._call([{
|
||||
|
||||
queries = [{
|
||||
"action": "query",
|
||||
"expression": (
|
||||
"select value, entity_id from CustomAttributeValue "
|
||||
"where entity_id in ({}) and configuration.key in ({})"
|
||||
).format(entity_ids_joined, attributes_joined)
|
||||
}])
|
||||
}]
|
||||
if not missing_defaults:
|
||||
if hasattr(session, "call"):
|
||||
[values] = session.call(queries)
|
||||
else:
|
||||
[values] = session._call(queries)
|
||||
|
||||
ftrack_project_id = self.cur_project["id"]
|
||||
|
||||
for attr in hier_attrs:
|
||||
|
|
|
|||
|
|
@ -780,10 +780,10 @@ class SyncEntitiesFactory:
|
|||
entity_ids_joined, attributes_joined
|
||||
)
|
||||
}]
|
||||
if hasattr(self.session, "_call"):
|
||||
[values] = self.session._call(call_expr)
|
||||
else:
|
||||
if hasattr(self.session, "call"):
|
||||
[values] = self.session.call(call_expr)
|
||||
else:
|
||||
[values] = self.session._call(call_expr)
|
||||
|
||||
for value in values["data"]:
|
||||
entity_id = value["entity_id"]
|
||||
|
|
@ -843,10 +843,10 @@ class SyncEntitiesFactory:
|
|||
"where entity_id in ({}) and configuration.key in ({})"
|
||||
).format(entity_ids_joined, attributes_joined)
|
||||
}]
|
||||
if hasattr(self.session, "_call"):
|
||||
[values] = self.session._call(call_expr)
|
||||
else:
|
||||
if hasattr(self.session, "call"):
|
||||
[values] = self.session.call(call_expr)
|
||||
else:
|
||||
[values] = self.session._call(call_expr)
|
||||
|
||||
avalon_hier = []
|
||||
for value in values["data"]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue