Broken items after moving media #3220

Open
opened 2019-06-28 13:28:40 +00:00 by rlx · 0 comments
Owner

After moving the (only single) file from https://0xdb.org/0xEF91993AB21EC907 to https://0xdb.org/2870300, the original item stays around, without media.

https://0xdb.org/2870300 exists, but doesn't have a poster, and doesn't appear in results. Loading its media view causes a server error.

Traceback (most recent call last):

  File "/srv/pandora/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)

  File "/srv/pandora/lib/python3.6/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)

  File "/srv/pandora/lib/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)

  File "/srv/pandora/lib/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "/srv/pandora/pandora/oxdjango/api/views.py", line 51, in api
    response = f(request, data)

  File "/srv/pandora/pandora/item/views.py", line 330, in find
    response['data']['items'] = get_items(request, query)

  File "/srv/pandora/pandora/item/views.py", line 213, in get_items
    items = [only_p_sums(request, query, m) for m in qs]

  File "/srv/pandora/pandora/item/views.py", line 213, in <listcomp>
    items = [only_p_sums(request, query, m) for m in qs]

  File "/srv/pandora/pandora/item/views.py", line 180, in only_p_sums
    r[p] = getattr(m.sort, p)

  File "/srv/pandora/lib/python3.6/site-packages/django/db/models/fields/related_descriptors.py", line 407, in __get__
    self.related.get_accessor_name()

django.db.models.fields.related_descriptors.RelatedObjectDoesNotExist: Item has no sort.


<WSGIRequest: POST '/api/'>
After moving the (only single) file from <https://0xdb.org/0xEF91993AB21EC907> to <https://0xdb.org/2870300,> the original item stays around, without media. <https://0xdb.org/2870300> exists, but doesn't have a poster, and doesn't appear in results. Loading its media view causes a server error. ``` Traceback (most recent call last): File "/srv/pandora/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/srv/pandora/lib/python3.6/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response response = self._get_response(request) File "/srv/pandora/lib/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/srv/pandora/lib/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/pandora/pandora/oxdjango/api/views.py", line 51, in api response = f(request, data) File "/srv/pandora/pandora/item/views.py", line 330, in find response['data']['items'] = get_items(request, query) File "/srv/pandora/pandora/item/views.py", line 213, in get_items items = [only_p_sums(request, query, m) for m in qs] File "/srv/pandora/pandora/item/views.py", line 213, in <listcomp> items = [only_p_sums(request, query, m) for m in qs] File "/srv/pandora/pandora/item/views.py", line 180, in only_p_sums r[p] = getattr(m.sort, p) File "/srv/pandora/lib/python3.6/site-packages/django/db/models/fields/related_descriptors.py", line 407, in __get__ self.related.get_accessor_name() django.db.models.fields.related_descriptors.RelatedObjectDoesNotExist: Item has no sort. <WSGIRequest: POST '/api/'> ```
j added the
backend
label 2019-06-28 13:28:40 +00:00
j added this to the 14.04 milestone 2019-06-28 13:28:40 +00:00
j self-assigned this 2019-06-28 13:28:40 +00:00
j added the
normal
defect
labels 2019-06-28 13:28:40 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: 0x2620/pandora#3220
No description provided.