Clean up some code.

This commit is contained in:
James Cole
2020-10-13 06:35:33 +02:00
parent 3bd5ac21c9
commit 4e51f0abc4
33 changed files with 149 additions and 294 deletions

View File

@@ -72,8 +72,8 @@ class MigrateAttachments extends Command
foreach ($attachments as $att) {
// move description:
$description = (string) $att->description;
if ('' !== $description) {
$attDescription = (string) $att->description;
if ('' !== $attDescription) {
// find or create note:
$note = $att->notes()->first();
@@ -81,7 +81,7 @@ class MigrateAttachments extends Command
$note = new Note;
$note->noteable()->associate($att);
}
$note->text = $description;
$note->text = $attDescription;
$note->save();
// clear description: