mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
small variable name changes
This commit is contained in:
parent
7de3d76075
commit
e014deb411
1 changed files with 9 additions and 5 deletions
|
|
@ -55,7 +55,7 @@ def new_project_document(
|
|||
"_id": _create_or_convert_to_mongo_id(entity_id),
|
||||
"name": project_name,
|
||||
"type": CURRENT_PROJECT_SCHEMA,
|
||||
"data": data,
|
||||
"entity_data": data,
|
||||
"config": config
|
||||
}
|
||||
|
||||
|
|
@ -290,6 +290,10 @@ class AbstractOperation(object):
|
|||
def to_data(self):
|
||||
"""Convert opration to data that can be converted to json or others.
|
||||
|
||||
Warning:
|
||||
Current state returns ObjectId objects which cannot be parsed by
|
||||
json.
|
||||
|
||||
Returns:
|
||||
Dict[str, Any]: Description of operation.
|
||||
"""
|
||||
|
|
@ -412,16 +416,16 @@ class UpdateOperation(AbstractOperation):
|
|||
)
|
||||
|
||||
def to_data(self):
|
||||
fields = {}
|
||||
changes = {}
|
||||
for key, value in self._update_data.items():
|
||||
if value is REMOVED_VALUE:
|
||||
value = None
|
||||
fields[key] = value
|
||||
changes[key] = value
|
||||
|
||||
output = super(UpdateOperation, self).to_data()
|
||||
output.update({
|
||||
"entity_id": str(self.entity_id),
|
||||
"fields": fields
|
||||
"entity_id": self.entity_id,
|
||||
"changes": changes
|
||||
})
|
||||
return output
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue