Fix update data

This commit is contained in:
Jeremy Stretch 2020-06-05 10:05:54 -04:00
parent 86e5a09b01
commit 8cc1dc9f1c

View File

@ -579,7 +579,7 @@ class APIViewTestCases:
"""
instance = self.model.objects.first()
url = self._get_detail_url(instance)
update_data = self.update_data
update_data = self.update_data or getattr(self, 'create_data')[0]
response = self.client.patch(url, update_data, format='json', **self.header)
self.assertHttpStatus(response, status.HTTP_200_OK)