Skip to content
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

Fix workbench validation for CollectionObjectType #5175

Closed
sharadsw opened this issue Aug 5, 2024 · 1 comment · Fixed by #5221
Closed

Fix workbench validation for CollectionObjectType #5175

sharadsw opened this issue Aug 5, 2024 · 1 comment · Fixed by #5221
Assignees
Labels
1 - Bug Incorrect behavior of the product geospecify
Milestone

Comments

@sharadsw
Copy link
Contributor

sharadsw commented Aug 5, 2024

Describe the bug
From #5170: Workbench validation does not work when mappings involve CollectionObjectType

To Reproduce
Steps to reproduce the behavior:

  1. Create a workbench dataset
  2. Choose base table as CollectionObjectType or CollectionObject
  3. Map a column to a relation with CollectionObjectType
  4. Click validate
  5. See error

Expected behavior
Workbench should be able to validate columns related to CollectionObjectType

Screenshots
From #5170:

chrome_frE2kFyiiK.mp4
@sharadsw sharadsw added 1 - Bug Incorrect behavior of the product geospecify labels Aug 5, 2024
@CarolineDenis CarolineDenis added this to the 7.9.7 milestone Aug 5, 2024
@sharadsw
Copy link
Contributor Author

sharadsw commented Aug 6, 2024

AttributeError(\"module 'specifyweb.specify.models' has no attribute 'Collectionobjecttype'\")

Looks like an import error in the backend due to the model actually being named CollectionObjectType instead of Collectionobjecttype. It's happening with all geo tables.

The request payload being sent from the frontend when saving the upload plan mapper for the above dataset looks fine to me.

{
  "uploadplan": {
    "baseTableName": "collectionobject",
    "uploadable": {
      "uploadTable": {
        "wbcols": {
          "projectnumber": "Project Number",
          "fieldnumber": "Collection Object - GUID"
        },
        "static": {},
        "toOne": {
          "collectionobjecttype": {
            "uploadTable": {
              "wbcols": {
                "name": "Collection Object Type"
              },
              "static": {},
              "toOne": {},
              "toMany": {}
            }
          }
        },
        "toMany": {}
      }
    }
  }
}

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 geospecify
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants