Commit 23eb8a8
John Pinto
Issue #3561 - Fix for bug "Discrepancy in Org Admin view of the
Organisation Plans and the related CSV Download".
Changes:
- where(Role.creator_condition) condition added to Plans retrieved in
the Org model's org_admin_plans method. This ensures that Plans
returned are only active plans. Note: if an owner or co-owner
de-activates a plan the Role of the user is set to active: false, so any
plan with creator with role (having active: false) would mean the Plan
is removed.
- To avoid duplication we removed .where(Role.creator_condition) in
org_admin method in app/controllers/paginable/plans_controller.rb from
line
plans = plans.joins(:template, roles: [user::org]).where(Role.creator_condition).1 parent bfbb518 commit 23eb8a8
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
299 | 300 | | |
| 301 | + | |
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
| |||
0 commit comments