shesha-io / shesha-framework

An open-source Low-Code development framework for .NET developers. Create .NET based business applications with 80% less code.
https://shesha.io
Apache License 2.0
376 stars 74 forks source link

Quick Search on person crud returns error: "reference-list `Shesha\\Shesha.Core.PersonType` not found" #2144

Open MarshallRJ opened 2 months ago

MarshallRJ commented 2 months ago

Describe the bug When using the QuickSearch on the Person Crud the following error is thrown:

"error": {
    "code": 404,
    "message": "reference-list `Shesha\\Shesha.Core.PersonType` not found",
    "details": "reference-list `Shesha\\Shesha.Core.PersonType` not found",
    "validationErrors": null
  }

To Reproduce Steps to reproduce the behavior:

  1. Go the Person Crud Swagger on the API: https://pd-enterpriseproject-api-test.shesha.dev/swagger/index.html?urls.primaryName=PersonCrud
  2. Authorize
  3. Execute the get all with something in the QuickSearch Eg:https://pd-enterpriseproject-api-test.shesha.dev/api/dynamic/Shesha/Person/Crud/GetAll?quickSearch=test
  4. You will receive the above error

Expected behavior The matching people should be returned

Screenshots image

Additional context This seems to only be on projects consuming a recent version of Shesha. The PersonType reference list seems empty on these projects and perhaps that is what is causing the issue?

hlayisanimazuze commented 2 months ago

Hi @MarshallRJ, the reason is returning that error is because the personType is a data driven reference list and is not assigned to the Shesha module. If you manually assign the referenceList to the correct module, it will succeed.

@IvanIlyichev @AlexStepantsov is there a way we can auto-assign the referenceList module on data driven referenceList?