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

Unbound variable error at /api/v1/stories/meta/ #738

Open
ansal opened this issue Sep 29, 2017 · 2 comments
Open

Unbound variable error at /api/v1/stories/meta/ #738

ansal opened this issue Sep 29, 2017 · 2 comments
Assignees

Comments

@ansal
Copy link
Collaborator

ansal commented Sep 29, 2017

Traceback (most recent call last):
  File "/home/ubuntu/dubdubdub/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/ubuntu/dubdubdub/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 105, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/ubuntu/dubdubdub/venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/ubuntu/dubdubdub/venv/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/ubuntu/dubdubdub/venv/local/lib/python2.7/site-packages/rest_framework/views.py", line 400, in dispatch
    response = self.handle_exception(exc)
  File "/home/ubuntu/dubdubdub/venv/local/lib/python2.7/site-packages/rest_framework/views.py", line 397, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/ubuntu/dubdubdub/apps/stories/api_views.py", line 818, in get
    unique_schools_counts_per_source,
  File "/home/ubuntu/dubdubdub/apps/stories/api_views.py", line 913, in get_json
    json['schools'] = school_count
UnboundLocalError: local variable 'school_count' referenced before assignment
@prajdataspect
Copy link
Collaborator

I have made a change on my local machine. Is there a test case to check it's working?

@ansal
Copy link
Collaborator Author

ansal commented Oct 3, 2017

@prajdataspect We dont have any test cases as of now. You have to test the endpoints manually.

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