Skip to content

Modifying a schema mapping results in an error #1385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
grantfitzsimmons opened this issue May 3, 2022 · 11 comments
Open

Modifying a schema mapping results in an error #1385

grantfitzsimmons opened this issue May 3, 2022 · 11 comments
Labels
1 - Bug Incorrect behavior of the product 2 - Queries Issues that are related to the query builder or queries in general

Comments

@grantfitzsimmons
Copy link
Member

To Reproduce
Steps to reproduce the behavior:

  1. Go to a schema export mapping for DwCA
  2. Modify the query
  3. Save

image

After repeating this, I was able to press Save without an error, but no changes were saved.

Desktop (please complete the following information):

  • macOS, Edge
@grantfitzsimmons grantfitzsimmons added 1 - Bug Incorrect behavior of the product pri:unknown labels May 3, 2022
@maxpatiiuk
Copy link
Member

Specify 7 doesn't yet support editing schema mappings
Would be fixed in the future release

@grantfitzsimmons
Copy link
Member Author

I can edit them in 7-edge!

@maxpatiiuk
Copy link
Member

Do you get this error on edge if you delete a field from this query and try to save it?

@grantfitzsimmons
Copy link
Member Author

I can only add fields- not remove them in a DwCA query. I see!

What is the difference between a query and a schema mapping fundamentally? Is it that 6 automatically gives the fields a mapping?

@maxpatiiuk
Copy link
Member

Yes, Sp6 links each query field to a record in the schema mapping table.
The back-end does not allow deleting the field until schema mapping is deleted
But front-end does not yet know anything about schema mapping, thus this error happens

@grantfitzsimmons
Copy link
Member Author

grantfitzsimmons commented Aug 16, 2022

@maxpatiiuk Can you make the front-end handle the schema mapping?

@grantfitzsimmons
Copy link
Member Author

@grantfitzsimmons
Copy link
Member Author

grantfitzsimmons commented Jan 23, 2023

("Cannot delete some instances of model 'Spqueryfield' because they are referenced through a protected foreign key: 'Spexportschemaitemmapping.queryfield'", <QuerySet [<Spexportschemaitemmapping: Spexportschemaitemmapping object (48)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (49)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (51)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (52)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (53)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (54)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (55)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (56)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (57)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (58)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (59)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (60)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (62)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (85)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (86)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (88)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (89)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (90)>, <Spexportschemaitemmapping: Spexportschemaitemmapping object (91)>]>)

Same error today reported by AAFC

https://aafcaacdao-edge.test.specifysystems.org/specify/query/61/

Specify 7 Crash Report - 2023-01-23T19 50 29.181Z.txt

@grantfitzsimmons
Copy link
Member Author

image

Marginally(?) improved by #2929– mostly in presentation

@grantfitzsimmons grantfitzsimmons moved this to 📋 Backlog in Back-End Backlog Mar 9, 2023
@grantfitzsimmons grantfitzsimmons moved this to 📋 Backlog in Front-End Backlog Mar 9, 2023
@grantfitzsimmons grantfitzsimmons added 2 - Queries Issues that are related to the query builder or queries in general and removed Unsorted labels Jul 2, 2023
@grantfitzsimmons
Copy link
Member Author

Reported by AAFC-AAC

@grantfitzsimmons grantfitzsimmons changed the title [a11y] Modifying a schema mapping results in an error Modifying a schema mapping results in an error Jul 22, 2023
@grantfitzsimmons
Copy link
Member Author

grantfitzsimmons commented Jul 5, 2024

Still encountering today, reported by NMSU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Bug Incorrect behavior of the product 2 - Queries Issues that are related to the query builder or queries in general
Projects
Status: 📋 Backlog
Status: 📋 Backlog
Development

No branches or pull requests

3 participants