about summary refs log tree commit diff
path: root/laravel/app/Song.php
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2022-04-20 17:42:04 +0000
committerZach DeCook <zachdecook@librem.one>2022-04-20 17:42:04 +0000
commitb5b0dc2fd788ce2e27bebb14562f2225c0078871 (patch)
treeffcb7faa074591e37b8f81d52cbd635fdd56b092 /laravel/app/Song.php
parentfe002d9aec3e0b511d79fbe2400d18713a0c94e0 (diff)
downloadprosongsa-b5b0dc2fd788ce2e27bebb14562f2225c0078871.tar.gz
New song: Supposedly fix creation of new song
Diffstat (limited to 'laravel/app/Song.php')
-rw-r--r--laravel/app/Song.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/laravel/app/Song.php b/laravel/app/Song.php
index a50a5f0..99b0aa4 100644
--- a/laravel/app/Song.php
+++ b/laravel/app/Song.php
@@ -43,7 +43,7 @@ class Song extends Model
     public function setTextAttribute($text)
     {
         // Watch out, this saves immediately!
-        if ($text) {
+        if ($text && $this->id) {
             file_put_contents("public/text/{$this->id}.txt", $text);
         }
     }