convert django lazy string proxies to strings in the base schema validator, rather than in the serialization code of each source model

This commit is contained in:
Gwendolyn 2023-12-11 20:49:50 +01:00
parent 4c06abd400
commit 4b1ac9f194
21 changed files with 126 additions and 104 deletions

View file

@ -187,7 +187,7 @@ class APIHybridFormTemplateResponse(APIHybridResponse):
def get_api_response(self, request):
result = {}
if self.error:
result['error'] = str(self.error.message)
result['error'] = self.error.message
self.status_code = self.error.status_code
if request.method == 'POST':
if not self.form.is_valid():