Compare commits
2 commits
29750850d1
...
8c65f2c25f
Author | SHA1 | Date | |
---|---|---|---|
8c65f2c25f | |||
c52f6699c6 |
1 changed files with 3 additions and 3 deletions
6
scl.py
6
scl.py
|
@ -401,8 +401,8 @@ with Session(engine) as session:
|
||||||
|
|
||||||
previous_event_class = classify_event_size(existing_record.num_people)
|
previous_event_class = classify_event_size(existing_record.num_people)
|
||||||
if event_class["size"] != previous_event_class["size"]:
|
if event_class["size"] != previous_event_class["size"]:
|
||||||
updated_properties.append("outage size")
|
updated_properties.append("size")
|
||||||
updated_entries.append("Outage Size: {}".format(event_class["size"]))
|
updated_entries.append("Size: {}".format(event_class["size"]))
|
||||||
if status != existing_record.status:
|
if status != existing_record.status:
|
||||||
existing_record.status = status
|
existing_record.status = status
|
||||||
updated_properties.append("status")
|
updated_properties.append("status")
|
||||||
|
@ -413,7 +413,7 @@ with Session(engine) as session:
|
||||||
# Used to determine the maximum number of people affected by this outage, to determine if it's worth posting about
|
# Used to determine the maximum number of people affected by this outage, to determine if it's worth posting about
|
||||||
existing_record.max_num_people = event["numPeople"]
|
existing_record.max_num_people = event["numPeople"]
|
||||||
max_event_class = classify_event_size(existing_record.max_num_people)
|
max_event_class = classify_event_size(existing_record.max_num_people)
|
||||||
if shapely.equals(existing_record.outage_geometries, outage_geometries):
|
if not shapely.equals(existing_record.outage_geometries, outage_geometries):
|
||||||
print(
|
print(
|
||||||
"Geometries modified. Equals: {}, DE-9IM: {}, Within: {}".format(
|
"Geometries modified. Equals: {}, DE-9IM: {}, Within: {}".format(
|
||||||
outage_geometries.equals(existing_record.outage_geometries),
|
outage_geometries.equals(existing_record.outage_geometries),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue