Commit d87be23
committed
Fix tag processing to not skip tags and in cases where a content item has multiple tag properties
This fixes two issues:
- In the ValidateTags method tags were removed from the list of tags (as the copy made in CheckContentProperties was by reference, it would mutate the original list). This would cause subsequent content items to be processed to not include that tag, leading to incorrect results. This is fixed by not modifying the collection at all, but simply computing the set difference between all tags and the tags that the content is tagged with using Except
- When a content item had multiple tag properties, the logic would in theory remove all occurences of the content item in tags that were not in the last tag property. By chance this did not happen, because of the above bug. By rewriting the logic to first collect the tags from all properties, this issue is (re)avoided1 parent 2bcdff8 commit d87be23
1 file changed
+16
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 80 | + | |
| 81 | + | |
90 | 82 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
96 | 86 | | |
97 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
98 | 91 | | |
99 | | - | |
100 | | - | |
| 92 | + | |
| 93 | + | |
101 | 94 | | |
102 | | - | |
103 | | - | |
104 | | - | |
| 95 | + | |
| 96 | + | |
105 | 97 | | |
106 | 98 | | |
107 | 99 | | |
| |||
139 | 131 | | |
140 | 132 | | |
141 | 133 | | |
142 | | - | |
| 134 | + | |
143 | 135 | | |
144 | 136 | | |
145 | 137 | | |
146 | | - | |
147 | | - | |
148 | 138 | | |
149 | 139 | | |
150 | 140 | | |
| |||
153 | 143 | | |
154 | 144 | | |
155 | 145 | | |
156 | | - | |
| 146 | + | |
157 | 147 | | |
158 | 148 | | |
159 | 149 | | |
| |||
0 commit comments