mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
use "id" key where id of input is stored instead of "input"
This commit is contained in:
parent
aaca2400a4
commit
c728eec8ab
2 changed files with 7 additions and 2 deletions
|
|
@ -103,7 +103,7 @@ class IntegrateInputLinks(pyblish.api.ContextPlugin):
|
||||||
# future.
|
# future.
|
||||||
link = OrderedDict()
|
link = OrderedDict()
|
||||||
link["type"] = link_type
|
link["type"] = link_type
|
||||||
link["input"] = io.ObjectId(input_id)
|
link["id"] = io.ObjectId(input_id)
|
||||||
link["linkedBy"] = "publish"
|
link["linkedBy"] = "publish"
|
||||||
|
|
||||||
if "inputLinks" not in version_doc["data"]:
|
if "inputLinks" not in version_doc["data"]:
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,13 @@ class SimpleLinkView(QtWidgets.QWidget):
|
||||||
# inputs
|
# inputs
|
||||||
#
|
#
|
||||||
for link in version_doc["data"].get("inputLinks", []):
|
for link in version_doc["data"].get("inputLinks", []):
|
||||||
|
# Backwards compatibility for "input" key used as "id"
|
||||||
|
if "id" not in link:
|
||||||
|
link_id = link["input"]
|
||||||
|
else:
|
||||||
|
link_id = link["id"]
|
||||||
version = self.dbcon.find_one(
|
version = self.dbcon.find_one(
|
||||||
{"_id": link["input"], "type": "version"},
|
{"_id": link_id, "type": "version"},
|
||||||
projection={"name": 1, "parent": 1}
|
projection={"name": 1, "parent": 1}
|
||||||
)
|
)
|
||||||
if not version:
|
if not version:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue