Fix 500 error when adding viewers to catalog.

This commit is contained in:
Saleem Latif
2018-04-11 14:49:03 +05:00
parent d8d7e33879
commit d2c97d6402

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']}))