updated
This commit is contained in:
@ -395,18 +395,15 @@ def publish_date(sender, instance, created, **kwargs):
|
|||||||
updateLineTable(mdl, fields)
|
updateLineTable(mdl, fields)
|
||||||
if instance.layerof == 3:
|
if instance.layerof == 3:
|
||||||
updatePolygonTable(mdl, fields)
|
updatePolygonTable(mdl, fields)
|
||||||
time.sleep(2)
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('##################',e)
|
print('##################',e)
|
||||||
|
|
||||||
|
|
||||||
def updateLineTable(mdl, fields):
|
def updateLineTable(mdl, fields):
|
||||||
print("Done")
|
print(f"Updating {fields[0]} - {fields[1]}")
|
||||||
print(f"Updated {fields[0]} - {fields[1]}")
|
|
||||||
print(len(fields))
|
|
||||||
print(fields[0])
|
|
||||||
print(mdl.objects.filter(location_id = int(fields[0])))
|
print(mdl.objects.filter(location_id = int(fields[0])))
|
||||||
|
print("-------")
|
||||||
mdl.objects.filter(location_id = int(fields[0])).update(
|
mdl.objects.filter(location_id = int(fields[0])).update(
|
||||||
location_name= fields[1] if len(fields) > 1 else '',
|
location_name= fields[1] if len(fields) > 1 else '',
|
||||||
category=fields[2] if len(fields) > 2 else '',
|
category=fields[2] if len(fields) > 2 else '',
|
||||||
|
|||||||
Reference in New Issue
Block a user