Skip to content

Commit 7c474b3

Browse files
committed
Fixing save candidates when there is only single row
1 parent ad7404d commit 7c474b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/map_projects/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ def _delete_uploaded_file(file_path):
162162
@classmethod
163163
def format_request_data(cls, data, parent_resource=None):
164164
new_data = {
165-
key: val[0] if isinstance(val, list) and len(val) == 1 else val for key, val in data.items()
165+
key: val[0] if isinstance(val, list) and len(val) == 1 and key not in [
166+
'candidates'] else val for key, val in data.items()
166167
}
167168
cls.format_json(new_data, 'matches')
168169
cls.format_json(new_data, 'columns')

0 commit comments

Comments
 (0)