Commit 6cb6ff7
authored
Don't validate when marking patient as invalid (#3529)
The patient may be invalid because the NHS number itself is invalid, and
therefore we can't use `update!` because this checks the validations
first.
This fixes an issue we're seeing where the scheduled PDS check jobs are
failing as they can't invalidate patients who's NHS numbers are invalid:
https://good-machine.sentry.io/issues/6596123827/
Using `update_column` also means any callbacks or other validations
aren't called, which is probably fine, but I think once all the patients
in Mavis have valid NHS numbers we should revert this change to avoid
potential issues in the future where callbacks or validation haven't
been run.2 files changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
| 351 | + | |
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
434 | 447 | | |
435 | 448 | | |
436 | 449 | | |
| |||
0 commit comments