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