mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Make copy of selected attributes closer to existing
This commit is contained in:
parent
758e232b6c
commit
43f7ace90e
1 changed files with 10 additions and 5 deletions
|
|
@ -949,15 +949,20 @@ class ProjectPushItemProcess:
|
|||
return product_entity
|
||||
|
||||
src_attrib = self._src_product_entity["attrib"]
|
||||
copied_attrib = {
|
||||
"description": src_attrib.get("description"),
|
||||
"productGroup": src_attrib.get("productGroup")
|
||||
}
|
||||
|
||||
dst_attrib = {}
|
||||
for key in {
|
||||
"description",
|
||||
"productGroup",
|
||||
}:
|
||||
if key in src_attrib:
|
||||
dst_attrib[key] = src_attrib[key]
|
||||
|
||||
product_entity = new_product_entity(
|
||||
product_name,
|
||||
product_type,
|
||||
folder_id,
|
||||
attribs=copied_attrib
|
||||
attribs=dst_attrib
|
||||
)
|
||||
self._operations.create_entity(
|
||||
project_name, "product", product_entity
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue