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

ValueError: Field 'id' expected a number but got '<!--'. #2641

Open
sentryk8sonalabsorg bot opened this issue Jul 10, 2024 · 1 comment
Open

ValueError: Field 'id' expected a number but got '<!--'. #2641

sentryk8sonalabsorg bot opened this issue Jul 10, 2024 · 1 comment
Labels
API python Pull requests that update Python code

Comments

@sentryk8sonalabsorg
Copy link

Sentry Issue:

ValueError: invalid literal for int() with base 10: '<!--'
  File "django/db/models/fields/__init__.py", line 2053, in get_prep_value
    return int(value)

ValueError: Field 'id' expected a number but got '<!--'.
(17 additional frame(s) were not displayed)
...
  File "onadata/apps/api/viewsets/attachment_viewset.py", line 110, in list
    xform = XForm.objects.get(id=xform)
@sentryk8sonalabsorg sentryk8sonalabsorg bot added API python Pull requests that update Python code labels Jul 10, 2024
Copy link
Author

Should we use get_object_or_404(XForm, pk=xform)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

0 participants