-
Sub-task
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
-
1
-
False
-
None
-
False
-
COST-574 - Tag reconciliation
-
-
We used a default model serializer which allows us to order by all the options in the model. However, `order_by[parent]` on the `/parent` endpoint will return a row for every time the key is used in the tag mapping model.
This creates duplicates rows for the same key associated with the same uuid. This issue is to harden our serializer to only allow order by options that produce the expected behaviors.
Example URL:
http://localhost:8000/api/cost-management/v1/settings/tags/mappings/parent/?limit=10&order_by[parent]=asc&offset=0
Example Return:
"data": [ { "uuid":"9c6dfdb0-f8cd-4b62-b8db-71f160ec86f2", "key":"application", "source_type":"OCP", "cost_model_id":"ef84b2f5-4432-4fd5-bcc3-46e74b926e9d" }, { "uuid":"9c6dfdb0-f8cd-4b62-b8db-71f160ec86f2", "key":"application", "source_type":"OCP", "cost_model_id":"ef84b2f5-4432-4fd5-bcc3-46e74b926e9d" }]}
^ Notice how the uuid is the same