ckan / ckan/ckanext-excelforms

Editing row in excel appends to table instead of replacing if table has no primary key

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1
Forks
3
PR merge metrics
No merged PRs in 30d

Description

## CKAN version
2.11.1 commit `fd86be7f7 Update version number for 2.11.1`

ckan.ini:
`ckan.plugins = activity excelforms tabledesigner datatables_view datastore xloader`

### Describe the bug
Editing a specific row of a CSV resource by clicking on the "Edit in Excel" option downloads that row into an excel template, but uploading the edits with the file selection input next to the “Excel template” button below the preview causes the edited row to be _appended_ to the original table, if the table does not have a primary key specified:

![Image](https://github.com/user-attachments/assets/94b3c3e9-8da8-4dd7-b4a8-33e24ffe083f)

If, however, the table does have a primary key (in this example, the first column `uid`), then repeating the same process does result in the row being replaced by the edits:

![Image](https://github.com/user-attachments/assets/f9f8be96-ec70-428d-9013-5f5c0bb55e13)

### Expected behaviour
An existing row in the table without a primary key should be replaced with edited values if that row is selected for editing using excel forms.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.