Commit 0fbfa1d
Automatically remove orphaned grouper instances (#190)
* fix: remove orphaned grouper instances and add fallback for str()
Remove a grouper instance if the last Snippet instance connected to it gets deleted. Just in case also check for empty queryset in the name method of a grouper.
* chore: update translation files and add german translation
* test: add model test for new deletion behaviour
* fix: delete snippet before snippet group
* fix: use correct manager in test
* fix: make sure .delete() is also called when batch deleting in admin
* fix: ruff linting error
* fix: use versioning aware filter
* ci: auto fixes from pre-commit hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Marius Schulze <marius.schulze@lfda.de>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent 8ed5eda commit 0fbfa1d
File tree
151 files changed
+2841
-780
lines changed- src/djangocms_snippet
- locale
- af/LC_MESSAGES
- ar/LC_MESSAGES
- be/LC_MESSAGES
- bg/LC_MESSAGES
- bn/LC_MESSAGES
- ca/LC_MESSAGES
- cmn/LC_MESSAGES
- cs/LC_MESSAGES
- cy/LC_MESSAGES
- da/LC_MESSAGES
- de/LC_MESSAGES
- el/LC_MESSAGES
- en/LC_MESSAGES
- es_AR/LC_MESSAGES
- es_BO/LC_MESSAGES
- es_DO/LC_MESSAGES
- es/LC_MESSAGES
- et/LC_MESSAGES
- eu/LC_MESSAGES
- fa/LC_MESSAGES
- fi/LC_MESSAGES
- fr/LC_MESSAGES
- ga/LC_MESSAGES
- gl/LC_MESSAGES
- gu/LC_MESSAGES
- he/LC_MESSAGES
- hi/LC_MESSAGES
- hr/LC_MESSAGES
- hu/LC_MESSAGES
- id/LC_MESSAGES
- is_IS/LC_MESSAGES
- is/LC_MESSAGES
- it/LC_MESSAGES
- ja/LC_MESSAGES
- ka/LC_MESSAGES
- kk/LC_MESSAGES
- km/LC_MESSAGES
- ko_KR/LC_MESSAGES
- ko/LC_MESSAGES
- ku_IQ/LC_MESSAGES
- lt/LC_MESSAGES
- lv/LC_MESSAGES
- mn_MN/LC_MESSAGES
- mn/LC_MESSAGES
- mt/LC_MESSAGES
- nb/LC_MESSAGES
- nl/LC_MESSAGES
- no/LC_MESSAGES
- pl/LC_MESSAGES
- pt_BR/LC_MESSAGES
- pt/LC_MESSAGES
- ro/LC_MESSAGES
- ru/LC_MESSAGES
- sk/LC_MESSAGES
- sl_SI/LC_MESSAGES
- sl/LC_MESSAGES
- sq_AL/LC_MESSAGES
- sq/LC_MESSAGES
- sr@latin/LC_MESSAGES
- sr/LC_MESSAGES
- sv/LC_MESSAGES
- ta/LC_MESSAGES
- th_TH/LC_MESSAGES
- th/LC_MESSAGES
- tlh/LC_MESSAGES
- tr/LC_MESSAGES
- ug/LC_MESSAGES
- uk/LC_MESSAGES
- ur/LC_MESSAGES
- vi_VN/LC_MESSAGES
- vi/LC_MESSAGES
- zh_CN/LC_MESSAGES
- zh_TW/LC_MESSAGES
- zh/LC_MESSAGES
- tests
- requirements
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
151 files changed
+2841
-780
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
24 | | - | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
28 | | - | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
33 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
34 | 51 | | |
35 | 52 | | |
36 | 53 | | |
37 | | - | |
| 54 | + | |
38 | 55 | | |
39 | 56 | | |
40 | 57 | | |
41 | | - | |
| 58 | + | |
42 | 59 | | |
43 | 60 | | |
44 | 61 | | |
45 | | - | |
| 62 | + | |
46 | 63 | | |
47 | 64 | | |
48 | 65 | | |
49 | 66 | | |
50 | 67 | | |
51 | 68 | | |
52 | 69 | | |
53 | | - | |
| 70 | + | |
54 | 71 | | |
55 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | | - | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
28 | | - | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | | - | |
| 38 | + | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
38 | 56 | | |
39 | 57 | | |
40 | 58 | | |
41 | | - | |
| 59 | + | |
42 | 60 | | |
43 | 61 | | |
44 | 62 | | |
45 | | - | |
| 63 | + | |
46 | 64 | | |
47 | 65 | | |
48 | 66 | | |
49 | | - | |
| 67 | + | |
50 | 68 | | |
51 | 69 | | |
52 | 70 | | |
53 | 71 | | |
54 | 72 | | |
55 | 73 | | |
56 | 74 | | |
57 | | - | |
| 75 | + | |
58 | 76 | | |
59 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | | - | |
| 27 | + | |
21 | 28 | | |
22 | 29 | | |
23 | 30 | | |
24 | | - | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
28 | | - | |
| 35 | + | |
29 | 36 | | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
33 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
34 | 53 | | |
35 | 54 | | |
36 | 55 | | |
37 | | - | |
| 56 | + | |
38 | 57 | | |
39 | 58 | | |
40 | 59 | | |
41 | | - | |
| 60 | + | |
42 | 61 | | |
43 | 62 | | |
44 | 63 | | |
45 | | - | |
| 64 | + | |
46 | 65 | | |
47 | 66 | | |
48 | 67 | | |
49 | 68 | | |
50 | 69 | | |
51 | 70 | | |
52 | 71 | | |
53 | | - | |
| 72 | + | |
54 | 73 | | |
55 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
28 | | - | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
32 | | - | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
37 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
38 | 55 | | |
39 | 56 | | |
40 | 57 | | |
41 | | - | |
| 58 | + | |
42 | 59 | | |
43 | 60 | | |
44 | 61 | | |
45 | | - | |
| 62 | + | |
46 | 63 | | |
47 | 64 | | |
48 | 65 | | |
49 | | - | |
| 66 | + | |
50 | 67 | | |
51 | 68 | | |
52 | 69 | | |
53 | 70 | | |
54 | 71 | | |
55 | 72 | | |
56 | 73 | | |
57 | | - | |
| 74 | + | |
58 | 75 | | |
59 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
Binary file not shown.
0 commit comments