diff --git a/apps/application/serializers/application_serializers.py b/apps/application/serializers/application_serializers.py index 01a82a841..291d89603 100644 --- a/apps/application/serializers/application_serializers.py +++ b/apps/application/serializers/application_serializers.py @@ -279,7 +279,8 @@ class ApplicationSerializer(serializers.Serializer): 'x_type': float_location.get('x', {}).get('type', 'right'), 'x_value': float_location.get('x', {}).get('value', 0), 'y_type': float_location.get('y', {}).get('type', 'bottom'), - 'y_value': float_location.get('y', {}).get('value', 30)})) + 'y_value': float_location.get('y', {}).get('value', 30), + 'max_kb_id': str(uuid.uuid1()).replace('-', '')})) response = HttpResponse(s, status=200, headers={'Content-Type': 'text/javascript'}) return response diff --git a/apps/application/template/embed.js b/apps/application/template/embed.js index 7b5f50e64..9475de0be 100644 --- a/apps/application/template/embed.js +++ b/apps/application/template/embed.js @@ -132,7 +132,7 @@ const initChat=(root)=>{ function initMaxkb(){ const maxkb=document.createElement('div') const root=document.createElement('div') - const maxkbId = 'maxkb-'+crypto.randomUUID().split('-')[0] + const maxkbId = 'maxkb-'+'{{max_kb_id}}' root.id=maxkbId initMaxkbStyle(maxkb, maxkbId) maxkb.appendChild(root)