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

Collecting Trip Authorization deletion causes an error #3951

Closed
grantfitzsimmons opened this issue Aug 26, 2023 · 5 comments
Closed

Collecting Trip Authorization deletion causes an error #3951

grantfitzsimmons opened this issue Aug 26, 2023 · 5 comments
Assignees
Labels
1 - Bug Incorrect behavior of the product 2 - Forms Issues that are related to the form system todo:verify Needs Verification

Comments

@grantfitzsimmons
Copy link
Member

Describe the bug
Deleting a collecting trip authorization causes a crash.

To Reproduce
Steps to reproduce the behavior:

  1. Go to /specify/view/collectingtrip/10/
  2. Delete the 'eBird Checklists' record with no link in the web link field
  3. Click Save
  4. See error

https://kubirds82523-v79-dev.test.specifysystems.org/specify/view/collectingtrip/10/

TypeError at /api/specify/collectingtrip/10/ cannot unpack non-iterable NoneType object Request Method: PUT Request URL: http://kubirds82523-v79-dev.test.specifysystems.org/api/specify/collectingtrip/10/ Django Version: 3.2.15 Python Executable: /opt/specify7/ve/bin/python3.8 Python Version: 3.8.0 Python Path: ['/opt/specify7', '/opt/specify7', '/opt/specify7/ve/bin', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/opt/specify7/ve/lib/python3.8/site-packages', '/opt/specify7'] Server time: Sat, 26 Aug 2023 02:16:46 -0500

Specify 7 Crash Report - 2023-08-26T02 17 24.183Z.txt

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

Screen.Recording.2023-08-25.at.9.16.44.PM.mov
image

Desktop:

  • OS: macOS 14.0
  • Browser: Chrome and Firefox
  • Version: v7.9-dev and v7.8.13

Database Name: KUBirds_8_25_23

Reported By
Andy at KU

@grantfitzsimmons grantfitzsimmons added the 1 - Bug Incorrect behavior of the product label Aug 26, 2023
@grantfitzsimmons grantfitzsimmons changed the title Collecting Trip Authorization Collecting Trip Authorization deletion causes an error Aug 26, 2023
@grantfitzsimmons grantfitzsimmons added the 2 - Forms Issues that are related to the form system label Aug 26, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Front-End Backlog Aug 26, 2023
@grantfitzsimmons
Copy link
Member Author

500 error:

TypeError at /api/specify/collectingtrip/10/
cannot unpack non-iterable NoneType object

Request Method: PUT
Request URL: http://kubirds82523-v79-dev.test.specifysystems.org/api/specify/collectingtrip/10/
Django Version: 3.2.15
Python Executable: /opt/specify7/ve/bin/python3.8
Python Version: 3.8.0
Python Path: ['/opt/specify7', '/opt/specify7', '/opt/specify7/ve/bin', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/opt/specify7/ve/lib/python3.8/site-packages', '/opt/specify7']
Server time: Sat, 26 Aug 2023 02:21:40 -0500
Installed Applications:
('django.contrib.sessions',
 'django.contrib.staticfiles',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'specifyweb.specify',
 'specifyweb.permissions',
 'specifyweb.accounts',
 'specifyweb.stored_queries',
 'specifyweb.businessrules',
 'specifyweb.express_search',
 'specifyweb.context',
 'specifyweb.attachment_gw',
 'specifyweb.frontend',
 'specifyweb.barvis',
 'specifyweb.report_runner',
 'specifyweb.interactions',
 'specifyweb.workbench',
 'specifyweb.notifications',
 'specifyweb.export',
 'specifyweb.raven_placeholder')
Installed Middleware:
['django.middleware.gzip.GZipMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'specifyweb.context.middleware.ContextMiddleware',
 'specifyweb.permissions.middleware.PermissionsMiddleware',
 'specifyweb.middleware.general.GeneralMiddleware']


Traceback (most recent call last):
  File "/opt/specify7/ve/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/opt/specify7/ve/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/specify7/specifyweb/specify/views.py", line 39, in wrapped
    return view(request, *args, **kwargs)
  File "/opt/specify7/ve/lib/python3.8/site-packages/django/views/decorators/cache.py", line 31, in _cache_controlled
    response = viewfunc(request, *args, **kw)
  File "/opt/specify7/specifyweb/specify/views.py", line 72, in view
    return dispatch_func(request, *args, **kwargs)
  File "/opt/specify7/specifyweb/specify/api.py", line 132, in resource_dispatch
    obj = put_resource(request.specify_collection,
  File "/usr/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "/opt/specify7/specifyweb/specify/api.py", line 612, in put_resource
    return update_obj(collection, agent, name, id, version, data)
  File "/opt/specify7/specifyweb/specify/api.py", line 639, in update_obj
    handle_to_many(collection, agent, obj, data)
  File "/opt/specify7/specifyweb/specify/api.py", line 565, in handle_to_many
    rel_obj = update_obj(collection, agent,
  File "/opt/specify7/specifyweb/specify/api.py", line 635, in update_obj
    obj.save(force_update=True)
  File "/opt/specify7/specifyweb/specify/build_models.py", line 63, in save
    return super(model, self).save(*args, **kwargs)
  File "/opt/specify7/ve/lib/python3.8/site-packages/django/db/models/base.py", line 739, in save
    self.save_base(using=using, force_insert=force_insert,
  File "/opt/specify7/ve/lib/python3.8/site-packages/django/db/models/base.py", line 763, in save_base
    pre_save.send(
  File "/opt/specify7/ve/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 180, in send
    return [
  File "/opt/specify7/ve/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 181, in <listcomp>
    (receiver, receiver(signal=self, sender=sender, **named))
  File "/opt/specify7/specifyweb/businessrules/orm_signal_handler.py", line 19, in handler
    rule(sender, kwargs['instance'])
  File "/opt/specify7/specifyweb/businessrules/attachment_rules.py", line 27, in attachment_jointable_save
    obj.attachment.scopetype, obj.attachment.scopeid = Scoping(attachee)()

Exception Type: TypeError at /api/specify/collectingtrip/10/
Exception Value: cannot unpack non-iterable NoneType object
Request information:
USER: Specifyuser object (2)

GET: No GET data

POST: No POST data

FILES: No FILES data

COOKIES:
csrftoken = 'lYEtJdAQ3FI1bvZeAv6Pbh4kXg2HiDWo4JE2TkLaIAK36F6HrSi3fMWLWEbwRmSo'
sessionid = '4ldmsmqccf2fwpz18yyxd01rahg457ev'
collection = '4'

@CarolineDenis
Copy link
Contributor

I cannot reproduce this issue on xml-editor. Can someone else confirm and close this issue if the case?
@specify/dev-testing @specify/testing @specify/developers

@CarolineDenis CarolineDenis self-assigned this Nov 8, 2023
@CarolineDenis CarolineDenis added the todo:verify Needs Verification label Nov 8, 2023
@carlosmbe
Copy link
Contributor

carlosmbe commented Jan 4, 2024

Reproduced in XML Editor

Screen.Recording.2024-01-04.at.2.20.00.PM.mov

Reproduced in EDGE as of Jan 4, 2024

Screen.Recording.2024-01-04.at.2.16.38.PM.mov

Reproduced in 7.9

Screen.Recording.2024-01-04.at.2.14.36.PM.mov

Reproduced in 7.8.13

Screen.Recording.2024-01-04.at.2.12.46.PM.mov

@melton-jason
Copy link
Contributor

melton-jason commented Jan 5, 2024

This is very likely a duplicate of #3289
The fix for that issue (#3315 ) should fix this one as well.

@emenslin
Copy link
Collaborator

Fixed

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Front-End Backlog Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Bug Incorrect behavior of the product 2 - Forms Issues that are related to the form system todo:verify Needs Verification
Projects
Status: Done
Development

No branches or pull requests

5 participants