Commit 0deb391
committed
Fixed an import reporting its own fault as the row's error
A row's custom field values are validated before its transaction opens, so
by the time they are written there is nothing left in them that can be
refused. A write that fails there is the database saying no to us, not to
the publisher, and it was being handled as though it were the publisher's:
the driver's message, query text and all, went into the error file they open
next to their spreadsheet, and nobody who could act on it was told. The
failure still fails the row, because half a member is worse than none, but
the publisher now reads a sentence about what did not save and the original
goes to the error tracker, where a lock timeout or a constraint is something
someone can go and look at.
ref https://linear.app/ghost/issue/BER-38721 parent d68240e commit 0deb391
2 files changed
Lines changed: 28 additions & 1 deletion
File tree
- ghost/core
- core/server/services/members/import-export/import
- test/unit/server/services/members/import-export/import
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
581 | 582 | | |
582 | 583 | | |
583 | 584 | | |
584 | | - | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
585 | 595 | | |
586 | 596 | | |
587 | 597 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
246 | 263 | | |
247 | 264 | | |
248 | 265 | | |
| |||
0 commit comments