Commit 7b864a6
committed
fix(love): use addCollection/createTxCollectionCUD for MeetingMinutes creation
MeetingMinutes were created via createDoc/createTxCreateDoc, which stores
attachedTo/attachedToClass/collection inside the document attributes rather
than as top-level transaction properties. The collection counter trigger in
server/middleware/triggers.ts only fires when those fields are top-level,
so the Room's `meetings` counter was never incremented and the
MeetingMinutesSection.svelte guard (`meetings > 0`) always fell through to
"No meeting minutes".
- models/love: change @model parent from core.class.Doc to
core.class.AttachedDoc so hierarchy.isDerived works correctly
- plugins/love-resources: replace client.createDoc with client.addCollection
- server-plugins/love-resources: wrap createTxCreateDoc in createTxCollectionCUD
Fixes #10526
Related #8785, #7303
Signed-off-by: Yulian Diaz <5605867+spatialy@users.noreply.github.com>1 parent 44f2f8d commit 7b864a6
3 files changed
Lines changed: 11 additions & 7 deletions
File tree
- models/love/src
- plugins/love-resources/src
- server-plugins/love-resources/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | | - | |
178 | 177 | | |
179 | | - | |
180 | | - | |
181 | | - | |
| 178 | + | |
182 | 179 | | |
183 | 180 | | |
184 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
241 | 248 | | |
242 | 249 | | |
243 | 250 | | |
| |||
0 commit comments