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

Computed fields not return by GraphQL query #4851

Closed
atcrowe17 opened this issue Nov 23, 2023 · 2 comments · Fixed by #4946
Closed

Computed fields not return by GraphQL query #4851

atcrowe17 opened this issue Nov 23, 2023 · 2 comments · Fixed by #4946
Assignees
Labels
type: bug Something isn't working as expected
Milestone

Comments

@atcrowe17
Copy link

Environment

  • Nautobot version (Docker tag too if applicable): 2.0.3
  • Python version: 3.10.12
  • Database platform, version: postgres, 14.9
  • Middleware(s):

Steps to Reproduce

  1. Upgraded from Nautobot 1.5. to 2.0.3
  2. Created new computed field
    {% if obj.type == "xgs-pon" %}
    olt-{{ obj.mac_address }}
    {% endif %}
  3. Attempted GraphQL for new and pre-upgrade computed fields from the web interface and with pynautobot.

Computed field key:value is returned

Received this error after a query from the web interface:
“CustomFieldModel.get_computed_field() got an unexpected keyword argument ‘slug’”

@atcrowe17 atcrowe17 added triage This issue is new and has not been reviewed. type: bug Something isn't working as expected labels Nov 23, 2023
@atcrowe17
Copy link
Author

Tested on a fresh install of v2.0.4. Get the same error message.

@glennmatthews
Copy link
Contributor

Confirmed, incorrect code is here.

@glennmatthews glennmatthews removed the triage This issue is new and has not been reviewed. label Nov 27, 2023
@lampwins lampwins added this to the v2.1 milestone Dec 4, 2023
@glennmatthews glennmatthews self-assigned this Dec 8, 2023
glennmatthews added a commit that referenced this issue Dec 8, 2023
glennmatthews added a commit that referenced this issue Dec 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants