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

QueryBuilder can't find codes when looking for AbstractCode #6687

Open
edan-bainglass opened this issue Jan 9, 2025 · 0 comments
Open

QueryBuilder can't find codes when looking for AbstractCode #6687

edan-bainglass opened this issue Jan 9, 2025 · 0 comments
Labels

Comments

@edan-bainglass
Copy link
Member

Describe the bug

orm.QueryBuilder().append(orm.AbstractCode) will not find any codes, as the resultant query has {'node_type': {'like': 'data.code.abstract.%'}, whereas codes carry an entry point of data.core.code.%.

Steps to reproduce

Try finding any code with orm.QueryBuilder().append(orm.AbstractCode). Count should always come up null.

Expected behavior

Successfully find codes.

Your environment

  • Linux (aiidalab/full-stack image)
  • Python 3.9.13
  • aiida-core v2.6.3

Additional context

orm.QueryBuilder().append(orm.Code) works, yielding {'node_type': {'like': 'data.core.code.%'}. But then you're using the deprecated orm.Code.

edan-bainglass added a commit to aiidalab/aiidalab-widgets-base that referenced this issue Jan 9, 2025
- Add additional guards for missing code setup input
- Disable quick setup button if missing any requisites
- Apply uniqueness to missing template variables warning
- Make `ResourceSetupBaseWidget` "public"
- Fix code full label uniqueness check

Note that the fix in the query that looks for existing codes is a hack due to a potential bug in aiida-core. See aiidateam/aiida-core#6687.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant