Skip to content

Page crashes for admins when access point has no report data #28

@MoralCode

Description

@MoralCode
ERROR [app] Exception on /access_points/27 [GET]
Traceback (most recent call last):
  File "/app/venv/lib/python3.10/site-packages/flask/app.py", line 1455, in wsgi_app
    response = self.full_dispatch_request()
  File "/app/venv/lib/python3.10/site-packages/flask/app.py", line 869, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/app/venv/lib/python3.10/site-packages/flask_cors/extension.py", line 176, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/app/venv/lib/python3.10/site-packages/flask/app.py", line 867, in full_dispatch_request
    rv = self.dispatch_request()
  File "/app/venv/lib/python3.10/site-packages/flask/app.py", line 852, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/app/app.py", line 941, in access_point
    accessPointDetails=getAccessPoint(id, is_admin=is_admin)
  File "/app/app.py", line 630, in getAccessPoint
    accessPointInfo.update(access_point_admin_json(access_point))
  File "/app/app.py", line 263, in access_point_admin_json
    "status_report_id": status.report.id,
AttributeError: 'NoneType' object has no attribute 'report'

example: https://access.campuspulse.app/access_points/38

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions