Skip to content

Commit

Permalink
Merge pull request #200 from voisardf/pa002_objcount_fix
Browse files Browse the repository at this point in the history
sums number of point objects with same code
  • Loading branch information
voisardf authored May 25, 2020
2 parents dbbf974 + e4d1a80 commit 1236d05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crdppf/lib/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def add_layer(layer, featureid, featureinfo, translations, appconfig, topicdata)
for code in codegenres:
for result in results:
if result['properties']['intersectionMeasure'] == ' ':
measure = None
measure = 1
else:
measure = int(result['properties']['intersectionMeasure'].replace(' : ', '').replace(' - ', '').replace('[m2]', '').replace('[m]', ''))
if result['properties']['codegenre'] == code:
Expand Down Expand Up @@ -484,7 +484,7 @@ def get_content(id, request):
topicdata[str(topic.topicid)]["restrictions"].append({
"codegenre": legenddir+feature['codegenre']+".png",
"teneur": feature['teneur'],
"area": '',
"area": str(feature['intersectionMeasure']),
"area_pct": -1
})
else:
Expand Down

0 comments on commit 1236d05

Please sign in to comment.