Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptobench committed Feb 25, 2024
1 parent 6a346ab commit d5fe0c9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions stats-backend/api2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@


def list_ec2_instances_comparison(request):
try:
ec2_instances = EC2Instance.objects.all()
results = [_compare_ec2_and_golem(ec2) for ec2 in ec2_instances]
return JsonResponse({"comparison_overview": results}, safe=False)
except Exception as e:
return JsonResponse({"error": str(e)}, status=500)
ec2_instances = EC2Instance.objects.all()
results = [_compare_ec2_and_golem(ec2) for ec2 in ec2_instances]
return JsonResponse({"comparison_overview": results}, safe=False)


def _compare_ec2_and_golem(ec2):
Expand Down

0 comments on commit d5fe0c9

Please sign in to comment.