diff --git a/apps/pos_device/web/api/v1/viewsets/device.py b/apps/pos_device/web/api/v1/viewsets/device.py index e634831..bafd51d 100644 --- a/apps/pos_device/web/api/v1/viewsets/device.py +++ b/apps/pos_device/web/api/v1/viewsets/device.py @@ -204,7 +204,15 @@ class DeviceAssignmentViewSet(viewsets.ModelViewSet, SoftDeleteMixin): data['client'] = client_id elif client_data and client_data.get('organization') is False: - pass + # create client + client = CustomOperations().custom_create( + request=request, + view=POSClientViewSet(), + data=request.data['client_data'] + ) + client_id = client['id'] + + data['client'] = client_id # create assignment serializer = self.serializer_class(data=data)