Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git://github.com/flavour/ifrc

  • Loading branch information...
commit e6510b6febcb05ec70ce47353ef27d15a41546bd 2 parents cc66072 + b25675a
@flavour authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 modules/eden/stats.py
View
8 modules/eden/stats.py
@@ -290,7 +290,6 @@ def stats_update_time_aggregate(cls, data_id=None):
s3db = current.s3db
dtable = s3db.stats_data
atable = s3db.stats_aggregate
- s3db.vulnerability_data
stats_aggregated_period = cls.stats_aggregated_period
@@ -488,6 +487,8 @@ def stats_update_time_aggregate(cls, data_id=None):
parents = current.gis.get_parents(location_id)
async = current.s3task.async
loc_level = s3db.gis_location[location_id].level
+ if current.deployment_settings.has_module("vulnerability"):
+ vulnerability = True
for (start_date, end_date) in changed_periods:
s, e = str(start_date), str(end_date)
@@ -498,8 +499,9 @@ def stats_update_time_aggregate(cls, data_id=None):
async("stats_update_aggregate_location",
args = [loc_level, location.id, parameter_id, s, e])
- if parameter_id in s3db.vulnerability_ids() or \
- parameter_id == s3db.vulnerability_resilience_id():
+ if vulnerability and \
+ (parameter_id in s3db.vulnerability_ids() or \
+ parameter_id == s3db.vulnerability_resilience_id()):
s3db.vulnerability_update_resilience(loc_level,
location_id,
start_date,
Please sign in to comment.
Something went wrong with that request. Please try again.