Merge pull request #17925 from edx/saleem-latif/ENT-955

ENT-955: Fixed 500 error when adding viewers to catalog.
This commit is contained in:
George Babey
2018-04-11 14:16:16 -04:00
committed by GitHub

View File

@@ -218,7 +218,7 @@ class CatalogEditView(CatalogApiMixin, View):
response = client.catalogs(catalog_id).get()
catalog = Catalog(attributes=response)
return render_to_response(self.template_name, self.get_context_data(catalog, form, client), status=400)
catalog = client.catalogs(catalog_id).patch(form.instance.attributes)
catalog = client.catalogs(catalog_id).patch(form.cleaned_data)
return redirect(reverse('api_admin:catalog-edit', kwargs={'catalog_id': catalog['id']}))