Commit 27bd80c
committed
fix(epics): use actual group_id for save/delete operations on nested epics
When an epic belonging to a subgroup is retrieved through a parent
group's epic listing, save() and delete() operations would fail because
they used the parent group's path instead of the epic's actual group_id.
This commit overrides save() and delete() methods in GroupEpic to use
the epic's group_id attribute to construct the correct API path, ensuring
operations work correctly regardless of how the epic was retrieved.
Also add the ability to pass a custom path using `_pg_custom_path` to
the `UpdateMixin.update()` and `SaveMixin.save()` methods. This allowed
the override of the `update()` method to re-use the `SaveMixin.save()`
method.
Closes: #32611 parent 0f5655c commit 27bd80cCopy full SHA for 27bd80c
File tree
Expand file treeCollapse file tree
4 files changed
+145
-0
lines changedOpen diff view settings
Filter options
- gitlab
- v4/objects
- tests
- functional/api
- unit/objects
Expand file treeCollapse file tree
4 files changed
+145
-0
lines changedOpen diff view settings
Collapse file
+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
314 | 314 | |
315 | 315 | |
316 | 316 | |
| 317 | + |
| 318 | + |
317 | 319 | |
318 | 320 | |
319 | 321 | |
|
Collapse file
+59Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
| 5 | + |
5 | 6 | |
6 | 7 | |
7 | 8 | |
| ||
24 | 25 | |
25 | 26 | |
26 | 27 | |
| 28 | + |
27 | 29 | |
28 | 30 | |
29 | 31 | |
30 | 32 | |
31 | 33 | |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
32 | 91 | |
33 | 92 | |
34 | 93 | |
|
Collapse file
tests/functional/api/test_epics.py
Copy file name to clipboardExpand all lines: tests/functional/api/test_epics.py+40Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
1 | 3 | |
2 | 4 | |
| 5 | + |
| 6 | + |
3 | 7 | |
4 | 8 | |
5 | 9 | |
| ||
30 | 34 | |
31 | 35 | |
32 | 36 | |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
Collapse file
tests/unit/objects/test_epics.py
Copy file name to clipboard+44Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
0 commit comments