set device assigned state in pos login

This commit is contained in:
2025-08-25 17:00:56 +03:30
parent 4146a66950
commit b109578ce2

View File

@@ -59,7 +59,7 @@ class POSDeviceViewSet(viewsets.ModelViewSet, POSDeviceMixin):
# activate device
if device:
if not device.is_activated or not device.pre_registered:
if not device.is_activated or not device.pre_registered and device.assigned_state is True:
device.is_activated = True
device.save()