Skip to content

Commit

Permalink
Vol: Fix regression #1583
Browse files Browse the repository at this point in the history
PR: Minor Optimisation
  • Loading branch information
flavour committed Mar 12, 2022
1 parent b3b04b1 commit 845e9af
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eden-dev-c7c0f3101 (2022-02-08 15:56:38)
eden-dev-b3b04b117 (2022-03-12 16:26:34)
8 changes: 5 additions & 3 deletions modules/s3db/pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def pr_affiliation_onaccept(form):
db(query).update(**data)

# Clear descendant paths
current.s3db.pr_rebuild_path(pe_id, clear=True)
pr_rebuild_path(pe_id, clear=True)

# -------------------------------------------------------------------------
@staticmethod
Expand Down Expand Up @@ -764,7 +764,7 @@ def pr_affiliation_ondelete(row):
pe_id = deleted_fk.get("pe_id")

if pe_id:
current.s3db.pr_rebuild_path(pe_id, clear=True)
pr_rebuild_path(pe_id, clear=True)

# =============================================================================
class PersonModel(S3Model):
Expand Down Expand Up @@ -10282,12 +10282,14 @@ def pr_role_rebuild_path(role_id, skip=None, clear=False):
).first()
if not role:
return None
pe_id = role.pe_id

if role_id in skip:
return role.path

skip.add(role_id)

pe_id = role.pe_id

if role.role_type != OU:
path = None
else:
Expand Down
1 change: 0 additions & 1 deletion modules/s3db/vol.py
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,6 @@ def prep(r):
future_months = -144,
)
table.pe_label.readable = table.pe_label.writable = False
table.missing.readable = table.missing.writable = False
table.age_group.readable = table.age_group.writable = False

s3db.pr_person_details.occupation.label = T("Normal Job")
Expand Down
2 changes: 1 addition & 1 deletion static/themes/RMS/eden.min.css

Large diffs are not rendered by default.

0 comments on commit 845e9af

Please sign in to comment.