Skip to content
Snippets Groups Projects
Commit c7499fab authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Get all resources from a project instead

parent 6c333afb
No related branches found
No related tags found
3 merge requests!97Product/590 quota management,!96Sprint/2020 11,!95Topic/858-quotaApi
......@@ -138,7 +138,10 @@ namespace Coscine.Api.Project.Controllers
if (projectQuota.ResourceType.DisplayName == "rds")
{
var resources = resourceModel.GetAllWhere((resource) =>
resource.TypeId == projectQuota.ResourceType.Id);
resource.TypeId == projectQuota.ResourceType.Id
&& (from connection in resource.ProjectResourceResourceIdIds
where connection.ProjectId == guidId
select connection).Any());
var size = resources.Sum((resource) =>
rdsResourceTypeModel.GetById(resource.ResourceTypeOptionId.Value).Size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment