d74290036e
Cleaned up logout redirects Added suburbs admin page back. Wasn't able to create new suburbs Made active status check to any traveller save function
12 lines
449 B
Python
12 lines
449 B
Python
from .models import Traveller
|
|
|
|
|
|
def nightly_check_active_status():
|
|
for traveller in Traveller.objects.all():
|
|
start_date = traveller.travel_start_date
|
|
end_date = traveller.travel_end_date
|
|
is_active = traveller.is_active
|
|
traveller._update_active_status()
|
|
if start_date != traveller.travel_start_date or end_date != traveller.travel_end_date or is_active != traveller.is_active:
|
|
traveller.save()
|