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

Error saving via API #56

Closed
andybak opened this issue Sep 16, 2024 · 1 comment
Closed

Error saving via API #56

andybak opened this issue Sep 16, 2024 · 1 comment
Assignees

Comments

@andybak
Copy link
Contributor

andybak commented Sep 16, 2024

Unexpected response from Icosa: Traceback (most recent call last):
  File "/venv/lib/python3.11/site-packages/ninja/operation.py", line 107, in run
    result = self.view_func(request, **values)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/icosa/api/assets.py", line 308, in upload_new_assets
    asset = Asset.objects.create(
            ^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/django/db/models/manager.py", line 87, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/django/db/models/query.py", line 679, in create
    obj.save(force_insert=True, using=self.db)
  File "/opt/icosa/models.py", line 470, in save
    self.rank = self.get_updated_rank()
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/icosa/models.py", line 445, in get_updated_rank
    return asset_qs.first().rank
           ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'rank'
@jamesrampton
Copy link
Contributor

Fixed for API and front end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants