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

Create decorator method for controller creation #150

Open
wojtekwanczyk opened this issue Nov 11, 2019 · 0 comments
Open

Create decorator method for controller creation #150

wojtekwanczyk opened this issue Nov 11, 2019 · 0 comments
Assignees
Labels
refactor Code refactoring jobs

Comments

@wojtekwanczyk
Copy link
Owner

try:
    controller, controller_db = create_controller(controller_id)
except Controller.DoesNotExist:
    return JsonResponse(
        status=404,
        data={'error': 'no such id in database'}
    )

This code should be handled inside decorator method.

@Arcticae Arcticae self-assigned this Nov 20, 2019
@Arcticae Arcticae added the refactor Code refactoring jobs label Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code refactoring jobs
Projects
None yet
Development

No branches or pull requests

2 participants