[#992] /admin/locations returns inactive providers

Migrated from Redmine #992 | Author: Kristian Selnæs
Status: Rejected | Priority: Normal | Created: 2022-12-22


The endpoint /admin/locations returns locations with a list of it’s associated providers. However, this list includes deleted providers as well. We have a set of deleted providers. All these are returned as providers for our location with id 1.

When we query /admin/providers, only the active providers are returned. When we query for one of the deleted ones explicitly, e.g. /admin/providers/3, it returns a provider with is_active: false

Redmine Admin wrote:

it is correct behavior for API

Kristian Selnæs wrote:

Well, since it is impossible to delete providers completely there should at least be an option to either filter out inactive providers from locations. Alternatively the providers endpoint should have an option to include inactive providers.