doorcontrol: Use enum members instead of raw ids for "red" event types
This commit is contained in:
parent
05037b74fc
commit
cb8bf3da4f
@ -10,19 +10,19 @@ class HIDEventQuerySet(models.QuerySet):
|
|||||||
is_red=ExpressionWrapper(
|
is_red=ExpressionWrapper(
|
||||||
Q(
|
Q(
|
||||||
event_type__in=[
|
event_type__in=[
|
||||||
1022,
|
HIDEvent.EventType.DENIED_ACCESS_CARD_NOT_FOUND,
|
||||||
1023,
|
HIDEvent.EventType.DENIED_ACCESS_ACCESS_PIN_NOT_FOUND,
|
||||||
2024,
|
HIDEvent.EventType.DENIED_ACCESS_SCHEDULE,
|
||||||
2029,
|
HIDEvent.EventType.DENIED_ACCESS_WRONG_PIN,
|
||||||
2036,
|
HIDEvent.EventType.DENIED_ACCESS_CARD_EXPIRED,
|
||||||
2042,
|
HIDEvent.EventType.DENIED_ACCESS_PIN_LOCKOUT,
|
||||||
2043,
|
HIDEvent.EventType.DENIED_ACCESS_UNASSIGNED_CARD,
|
||||||
2046,
|
HIDEvent.EventType.DENIED_ACCESS_PIN_EXPIRED,
|
||||||
4041,
|
HIDEvent.EventType.DOOR_FORCED_ALARM,
|
||||||
4042,
|
HIDEvent.EventType.DOOR_HELD_ALARM,
|
||||||
4043,
|
HIDEvent.EventType.TAMPER_SWITCH_ALARM,
|
||||||
4044,
|
HIDEvent.EventType.AC_FAILURE,
|
||||||
4045,
|
HIDEvent.EventType.BATTERY_FAILURE,
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
output_field=models.BooleanField(),
|
output_field=models.BooleanField(),
|
||||||
|
Loading…
Reference in New Issue
Block a user