Skip to content

Commit

Permalink
Fix for default filters & stop disabling merge links in hrm/person (D…
Browse files Browse the repository at this point in the history
…ominic pls review both)
  • Loading branch information
flavour committed Mar 24, 2014
1 parent 2b400ad commit 50f6941
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
f3d3afa (2014-03-24 11:07:38)
2b400ad (2014-03-24 12:05:40)
2 changes: 2 additions & 0 deletions modules/s3/s3filter.py
Expand Up @@ -2097,6 +2097,8 @@ def apply_filter_defaults(request, resource):
if isinstance(applicable_defaults, dict):
if operator in applicable_defaults:
default = applicable_defaults[operator]
else:
continue
elif operator in (None, "belongs", "eq"):
default = applicable_defaults
else:
Expand Down
14 changes: 8 additions & 6 deletions modules/s3db/hrm.py
Expand Up @@ -184,7 +184,8 @@ def model(self):
ondelete = "SET NULL")

configure("hrm_department",
deduplicate=self.hrm_department_duplicate)
deduplicate = self.hrm_department_duplicate,
)

# =========================================================================
# Job Titles (Mayon: StaffResourceType)
Expand Down Expand Up @@ -294,7 +295,8 @@ def model(self):
)

configure("hrm_job_title",
deduplicate=self.hrm_job_title_duplicate)
deduplicate = self.hrm_job_title_duplicate,
)

# =========================================================================
# Human Resource
Expand Down Expand Up @@ -1711,7 +1713,7 @@ def model(self):
ondelete = "RESTRICT")

configure("hrm_competency_rating",
deduplicate = self.hrm_competency_rating_duplicate
deduplicate = self.hrm_competency_rating_duplicate,
)

# ---------------------------------------------------------------------
Expand Down Expand Up @@ -3394,7 +3396,7 @@ def model(self):

configure(tablename,
deduplicate = self.hrm_programme_duplicate,
)
)

# Components
self.add_components(tablename,
Expand Down Expand Up @@ -5792,8 +5794,8 @@ def postp(r, output):
csv_extra_fields=[dict(label="Type",
field=s3db.hrm_human_resource.type),
],
# Better in the native person controller:
deduplicate="",
# Better in the native person controller (but this isn't always accessible):
#deduplicate="",
orgname=orgname,
replace_option=T("Remove existing data before import"),
rheader=hrm_rheader,
Expand Down

0 comments on commit 50f6941

Please sign in to comment.