Grant
October 27, 2025, 11:32pm
2
Hi @nfshoobs ,
Thank you for your report! Upon investigating, I found that the WorkBench is incorrectly looking for the data model field fieldnotebookpageattachments when it does not exist (instead, the field is named attachments). The caption assigned to it in the Schema Config is not taken into account. I described this for our developers here:
opened 11:24PM - 27 Oct 25 UTC
2 - WorkBench
2 - Attachments
**Describe the bug**
Currently, the WorkBench assumes the base table's relations… hip to `attachment` is always through `{basetable}Attachments` when that is not always the case. For example, when uploading attachments to the [`fieldnotebookpage`](https://sp7demofish.specifycloud.org/specify/data-model/#fieldnotebookpage) table, it links through the data model field `attachments` instead. This results in an error when validating:
```json
Error occurred during Validation
{
"uploaderstatus": {
"operation": "validating",
"taskid": "d13848b2-9c55-4672-acd6-ce3d48f82eeb"
},
"taskstatus": "FAILURE",
"taskinfo": "FieldDoesNotExist(\"Fieldnotebookpage has no field named 'fieldnotebookpageattachments'\")"
}
```
Instead of that formula, the relationship to `attachment `is via the data model field `attachments` for the following tables:
* Field Notebook
* Field Notebook Page
* Field Notebook Page Set
* DNA Sequence
* DNA Sequencing Run
* Attachment Image Attribute
https://github.com/specify/specify7/blob/314d0beff53a9e037121fa2e42ed53bfe139ab03/specifyweb/backend/workbench/upload/upload_attachments.py#L96-L104
> Followup to this post: [Renaming base tables and changing icon](https://discourse.specifysoftware.org/t/renaming-base-tables-and-changing-icon/2924):
>
> [quote="nfshoobs, post:1, topic:2924"]
> When we were importing our collection’s data into Sp7 initially, we imported scans of our original catalog ledgers as `CollectionObjectAttachments`. I’ve decided that I want to move these attachment records to the `Field Notebook Page` and `Field Notebook Page Attachment` tables, as these tables have the correct relationship between COs that share entries on a ledger page (this avoids [this error](https://discourse.specifysoftware.org/t/bug-report-co-records-with-the-same-attachmentid-cannot-be-added-to-the-same-accession-accession-search-dialog-does-not-display-more-than-10-recordsets/2679) and also keeps images of the specimens themselves separate from ledger images in dwc exports, which is desirable).
> [/quote]
>
> Now that I've renamed our base table and have the fields and forms set up how I'd like them, I've been trying to get data uploaded into the newly renamed tables. I keep running into this error.
> I've tried renaming the caption of fieldnotebookpageattachments to literally be "fieldnotebookpageattachments" and signing out and back in, but have had no luck.
> I've added the upload plan below, we're running 7.11.2.
> [Attachments.tsv|attachment](upload://A6vxGqBvuMtopLsdZBPiQZcbq8L.tsv) (668.0 KB)
>
> Edit: can confirm that this issue does not appear to have to do with me renaming the base table. Same error occurs on the test server: https://sp7demofish.specifycloud.org/specify/workbench/3/
**To Reproduce**
Steps to reproduce the behavior:
1. Create a WorkBench data set with attachments for one of the aforementioned tables
2. Validate the data set
3. See error
**Expected behavior**
Tables with an unusual `attachment` relationship should be handled and it should work as it does in those cases.
**Crash Report**
macOS, Arc, `v7.11.2.1`
**Reported By**
Nate at OSU on the [Speciforum](https://discourse.specifysoftware.org/t/issue-attaching-attachments-via-workbench/3092)
This means that WorkBench Attachments are not supported for the following tables until a fix is pushed:
Field Notebook
Field Notebook Page
Field Notebook Page Set
DNA Sequence
DNA Sequencing Run
Attachment Image Attribute
I have raised this with our development team to discuss in an upcoming meeting! I appreciate you taking the time to share this with us!
1 Like