Commit 8f642fb
committed
Remove condition for #shadow_delete_documents
On the row where #shadow_delete_documents is called, topic.persisted?
also returns true for newly created topics since we just saved.
I don't think we really need a condition because docs_to_delete would be
blank for newly created topics. If we do want one, using
topic.previously_new_record? wouldn't work because topic gets updated
when running #attach_files, so we would have to do something like
"new_record = topic.new_record?" before calling topic.save_with_tags
and then use "unless new_record".1 parent 72c55b1 commit 8f642fb
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
| |||
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
78 | | - | |
| 77 | + | |
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
| |||
0 commit comments