saving works properly

This commit is contained in:
iLLiCiTiT 2020-08-21 15:57:50 +02:00
parent 1043b70550
commit 4ce1f70f88
2 changed files with 7 additions and 8 deletions

View file

@ -390,18 +390,17 @@ class ProjectWidget(QtWidgets.QWidget, PypeConfigurationWidget):
self._save_overrides()
def _save_overrides(self):
data = {}
groups = []
_data = {}
for item in self.input_fields:
value, is_group = item.overrides()
if value is not NOT_SET:
data.update(value)
_data.update(value)
if is_group:
groups.extend(value.keys())
raise Exception(
"Top item can't be overriden in Project widget."
)
if groups:
data[METADATA_KEY] = {"groups": groups}
data = _data.get("project") or {}
output_data = convert_gui_data_to_overrides(data)
overrides_json_path = config.path_to_project_overrides(