fix login bug in if state of (and or)

This commit is contained in:
2025-08-26 09:18:40 +03:30
parent b109578ce2
commit b5dfcebafe

View File

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