OperationCode/resources_api

Cannot delete last language when updating a resource

aaron-junot opened this issue · 1 comments

Currently, when you want to remove languages from a resource, you can remove all of them except for the last one.

If you send langauges: null or omit languages from the PUT request altogether, it should leave the languages alone and not update them at all (current behavior). But when you want to clear out the array of resources, you should be able to by sending languages: [], which currently does not clear out the languages because [] is falsey in python. We should check specifically for it to be sent as an empty list that's not null or missing altogether, and in that case, remove all languages from the resource.

@copygodistaken how are you coming on this? Would you like to set up a time to pair together on it and get it knocked out?