mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 00:11:16 -05:00
This was broken because sometimes `service.permissions` is a list of strings (for when we’re caching the service object) and sometimes it’s a list of permission objects (when we’re dealing with ORM objects). Because the validator code is shared, the least-messy way to fix it is to make sure it can handle both types. It can’t just take a list of permissions as argument, because it uses other fields on the service. It would be messy to rewrite the endpoint to use a serialised service because the tests all expect to be dealing with database objects, so it would be a faff to change what they’re mocking.
9.0 KiB
9.0 KiB