cache area break
This commit is contained in:
parent
8373f3c808
commit
31ff16d22c
|
@ -12,10 +12,16 @@ def cache_areas_info():
|
|||
缓存区域信息
|
||||
"""
|
||||
area_list = []
|
||||
is_ok = True
|
||||
for i in Area.objects.filter(is_hidden=False).exclude(third_info__xx_rail=None).order_by('number'):
|
||||
points = []
|
||||
for item in i.third_info['xx_rail']['detail']['polygon']['points']:
|
||||
if 'longitude' not in item:
|
||||
is_ok = False
|
||||
break
|
||||
points.append((item['longitude'], item['latitude']))
|
||||
if not is_ok:
|
||||
break
|
||||
area_dict = {
|
||||
'id': i.id,
|
||||
'type': i.type,
|
||||
|
|
Loading…
Reference in New Issue