event list token updated
This commit is contained in:
@@ -43,29 +43,28 @@ def create_all_events_from_actions():
|
||||
),
|
||||
system=True,
|
||||
).data
|
||||
if endpoint_restriction:
|
||||
if event_selected_function:
|
||||
selected_event = Events.filter_one(
|
||||
Events.event_type == event_selected.event_type,
|
||||
Events.function_class == event,
|
||||
Events.function_code == event_selected_key,
|
||||
Events.endpoint_id == endpoint_restriction.id,
|
||||
Events.endpoint_uu_id == str(endpoint_restriction.uu_id),
|
||||
system=True,
|
||||
).data
|
||||
if not selected_event:
|
||||
created_event = Events.find_or_create(
|
||||
event_type=event_selected.event_type,
|
||||
function_class=event,
|
||||
function_code=event_selected_key,
|
||||
endpoint_id=endpoint_restriction.id,
|
||||
endpoint_uu_id=str(endpoint_restriction.uu_id),
|
||||
**active_confirmed,
|
||||
)
|
||||
created_event.save()
|
||||
created_event.update(is_confirmed=True)
|
||||
created_event.save()
|
||||
print(f"Event created: {created_event.uu_id}")
|
||||
if endpoint_restriction and event_selected_function:
|
||||
selected_event = Events.filter_one(
|
||||
Events.event_type == event_selected.event_type,
|
||||
Events.function_class == event,
|
||||
Events.function_code == event_selected_key,
|
||||
Events.endpoint_id == endpoint_restriction.id,
|
||||
Events.endpoint_uu_id == str(endpoint_restriction.uu_id),
|
||||
system=True,
|
||||
).data
|
||||
if not selected_event:
|
||||
created_event = Events.find_or_create(
|
||||
event_type=event_selected.event_type,
|
||||
function_class=event,
|
||||
function_code=event_selected_key,
|
||||
endpoint_id=endpoint_restriction.id,
|
||||
endpoint_uu_id=str(endpoint_restriction.uu_id),
|
||||
**active_confirmed,
|
||||
)
|
||||
created_event.save()
|
||||
created_event.update(is_confirmed=True)
|
||||
created_event.save()
|
||||
print(f"Event created: {created_event.uu_id}")
|
||||
|
||||
for item in an_empty_list:
|
||||
if an_empty_list.count(item) > 1:
|
||||
|
||||
Reference in New Issue
Block a user