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

BugFix: Get_Agents_Project_id throwing 500 internal Server Error #674

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

Arkajit-Datta
Copy link
Contributor

@Arkajit-Datta Arkajit-Datta commented Jul 6, 2023

Description

This is a bugfix for the API endpoint - get_agents_by_project_id in controllers>agents.py
The endpoint was throwing 500 internal server error.

Related Issues

Solution and Design

  • The issue appeared whenever there wasn't any agent under a specific project id
  • The returning list was not initialized, hence it was throwing a 'reference before assignment' error.

Test Plan

Query the API for various project ids, specifically the ones having no active agents.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs update

Checklist

  • My pull request is atomic and focuses on a single change.
  • I have read the contributing guide and my code conforms to the guidelines.
  • I have documented my changes clearly and comprehensively.
  • I have added the required tests.

@luciferlinx101 luciferlinx101 merged commit ab08d91 into TransformerOptimus:dev Jul 6, 2023
@Arkajit-Datta Arkajit-Datta deleted the dev branch July 7, 2023 08:06
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

Successfully merging this pull request may close these issues.

2 participants