Skip to content

Commit 57e6e54

Browse files
committed
OpenConceptLab/ocl_issues#910 | export mappings | not loading relations eagerly
1 parent 73fa3d8 commit 57e6e54

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

core/common/utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,7 @@ def write_export_file(
305305
with open('export.json', 'a') as out:
306306
out.write(', ')
307307

308-
mapping_versions = queryset.select_related(
309-
'from_concept', 'to_concept', 'from_source__organization', 'from_source__user',
310-
'to_source__organization', 'to_source__user')
311-
data = mapping_serializer_class(mapping_versions, many=True).data
308+
data = mapping_serializer_class(queryset, many=True).data
312309
mapping_string = json.dumps(data, cls=encoders.JSONEncoder)
313310
mapping_string = mapping_string[1:-1]
314311
with open('export.json', 'a') as out:

0 commit comments

Comments
 (0)