Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,15 @@ def ref_or_id(ref_or_id, model_name, AccountChartTemplate=AccountChartTemplate):
for record_id, record_data in template_data[model_name].items():
if not any(record_data.get(key) for key in field_names):
continue
record = ref_or_id(record_id, model_name)
if not record:
# only complete existing records, _load_data would create
# the missing ones with just the fields in spec
continue
filtered = {
key: value
for key, value in record_data.items()
if key in field_names and not ref_or_id(record_id, model_name)[key]
if key in field_names and not record[key]
}
if filtered:
filtered_records[record_id] = filtered
Expand Down
Loading