add blank TZ as UTC
This commit is contained in:
parent
db84d87eb1
commit
c433c18c60
|
|
@ -15,8 +15,6 @@ def transfer_establishment():
|
||||||
# todo: filter(location__city__name__icontains='paris')
|
# todo: filter(location__city__name__icontains='paris')
|
||||||
old_establishments = Establishments.objects.exclude(
|
old_establishments = Establishments.objects.exclude(
|
||||||
id__in=list(Establishment.objects.all().values_list('old_id', flat=True))
|
id__in=list(Establishment.objects.all().values_list('old_id', flat=True))
|
||||||
).exclude(
|
|
||||||
Q(location__timezone__isnull=True),
|
|
||||||
).prefetch_related(
|
).prefetch_related(
|
||||||
'establishmentinfos_set',
|
'establishmentinfos_set',
|
||||||
'schedules_set',
|
'schedules_set',
|
||||||
|
|
@ -46,7 +44,7 @@ def transfer_establishment():
|
||||||
if item.location:
|
if item.location:
|
||||||
data.update({
|
data.update({
|
||||||
'location': item.location.id,
|
'location': item.location.id,
|
||||||
'tz': item.location.timezone,
|
'tz': item.location.timezone or 'UTC',
|
||||||
})
|
})
|
||||||
|
|
||||||
# Инфо
|
# Инфо
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user