Skip to content

Commit

Permalink
Update RawEmail patch
Browse files Browse the repository at this point in the history
In development occasionally see errors where the original data isn't
present, normally when my local ActiveStorage store has been cleared.

We can return nil here and some dev operations (EG. indexing) will then
succeed.
  • Loading branch information
gbp committed Sep 18, 2024
1 parent a45f319 commit 0a09c8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model_patches.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def is_school?
alias original_data data

def data
original_data.sub(/
original_data&.sub(/
^(Date: [^\n]+\n)
\s+(To: [^\n]+\n)
\s+(From: [^\n]+)
Expand Down

0 comments on commit 0a09c8c

Please sign in to comment.